- 編集済み
Character's back is lit when using Vertex Lit shader
When I use the Spine/Sprite/Vertex Lit shader, I found the result is strange. :o
It seems to treat the character’s back side as the front side and the character is lit when the light comes from back side:
I can get a normal result if I set the Initial Flip X of spine animation to true and set transform.rotation.y to 180, but it may affect the children of my character.
Is there any solutions for this? Many thanks!
Unfortunately I cannot reproduce the issue you are describing. When I modify the character of the Spine Examples/Other Examples/Sprite Shaders
scene, it works both when I flip the character via negative x-scale or via 180 degree rotation. However if I disable Solve Tangents
then the character receives no light at all. Do have this setting enabled?
If this does not help, I suspect some negative scaling in the hierarchy above maybe? You could try moving the Spine skeleton all the way up the hierarchy to be one of the root nodes, and see if the problem persists. If yes, could you please post the inspector settings of your character? Or even better - send us a minimal project that still shows the problem and send it to contact@esotericsoftware.com? That would help us a lot in resolving your problem!
Harald wroteUnfortunately I cannot reproduce the issue you are describing. When I modify the character of the
Spine Examples/Other Examples/Sprite Shaders
scene, it works both when I flip the character via negative x-scale or via 180 degree rotation. However if I disableSolve Tangents
then the character receives no light at all. Do have this setting enabled?
If this does not help, I suspect some negative scaling in the hierarchy above maybe? You could try moving the Spine skeleton all the way up the hierarchy to be one of the root nodes, and see if the problem persists. If yes, could you please post the inspector settings of your character? Or even better - send us a minimal project that still shows the problem and send it to contact@esotericsoftware.com? That would help us a lot in resolving your problem!
Thank you for your quick response! I compared my shader config with the config in examples. The problem is gone when I set Normal Fix to true and Fixed Normal Space to View-Space.
Great to hear! Thanks for getting back to us and letting us know!