+3
Under review
foliage shader scale shadow issue
Using the example foliage shader. If you have multiple instances of an object using this shader, and there is 2 objects with unique uniform scales above 1,1,1 then the shadows get offset in a strange way.
In the demo scene, scale the plant down to 1,1,1, duplicate it, scale it up, and then duplicate the scaled up model and the shadows pop. If you look around the edges of the leaves etc you can see the shadow has shifted, over laping the model along one edge and showing an unshadowed halo on the other edge. This ONLY happens with a uniform scale! If you change one of fields for example the x scale from 3.015 to 3.016 the issue is corrected, but returns if all the fields are returned to the same value(rounding issue?)
In the demo scene, scale the plant down to 1,1,1, duplicate it, scale it up, and then duplicate the scaled up model and the shadows pop. If you look around the edges of the leaves etc you can see the shadow has shifted, over laping the model along one edge and showing an unshadowed halo on the other edge. This ONLY happens with a uniform scale! If you change one of fields for example the x scale from 3.015 to 3.016 the issue is corrected, but returns if all the fields are returned to the same value(rounding issue?)
Customer support service by UserEcho
This is because Unity scales non-uniform scaling (Where (x = y = z) does not apply) on meshes *before* it's passed into the shader, but when the scaling is uniform (x = y = z), it's scaled on the GPU, but Shader Forge doesn't currently read the GPU scale, which is why these artifacts appear. Thanks for the report :)
Unfortunately it seems that changing the scaling will help in that particular instance I posted, but with many plants at different scales it doesn't correct it anymore. I will just sever the vertex animations for now, wait for that 'doesn't currently' to change. Thank you very much Joachim.