com.unity.demoteam.hair icon indicating copy to clipboard operation
com.unity.demoteam.hair copied to clipboard

BuiltIn Line Strand Renderer sometimes produces invalid normals

Open qlee01 opened this issue 2 years ago • 3 comments

On complex hair, I get black screen flickering using the BuiltIn Line Strand Renderer, probably due to invalid normals being produced. This behavior goes away as soon as I switch to BuiltIn Strips Strand Renderer, so I guess it is not fault of my shader.

qlee01 avatar Aug 14 '22 11:08 qlee01

On further observation, the issue only happens if Subdivision is being used; without Subdivision, the black flickering is not happening. So it seems the combination of Subdivision and Line Strand Renderer seems to produce invalid results. I tried to catch the NaNs in shader (not sure if it's even NaNs), but did not succeed. This happens mostly on very curly or afro style hair.

Edit: It seems that the "staging" needs to be turned off to avoid the flickering, having staging on and subdivision to 0 does not help.

Edit2: I was able to narrow down the issue on normals and tangents, both seem to produce NaNs. If I catch both, issue goes away. Hope this helps. BTW this is some awesome library.

qlee01 avatar Aug 15 '22 13:08 qlee01

this is so weird , looks like a bot or something

nukadelic avatar Aug 16 '22 23:08 nukadelic

this is so weird , looks like a bot or something

seems the bot got deleted ;)

qlee01 avatar Aug 17 '22 10:08 qlee01