- Home /
How to properly handle flipping in a Normal-Mapped Sprite Shader?
I'm attempting to create a normal-mapped Sprite shader based off of Unity 2018.2.8f's built-in "Sprites/Diffuse" shader and knowing when the sprite is flipped is required in order to do the appropriate normal map flipping too.
I noticed there is already a "_Flip" property which is used during the vertex function of the shader to do just that, however, it doesn't seem to be in use, since the actual vertex flipping seems to be happening during the batching stage, which makes sense for optimisation.
If _Flip is not being used by the Sprite Renderer and the vertex stream cannot be customized(yet?), does it mean the shader will never get said information without a custom script that actually does just that via a Material Property Block(thus breaking batching) or likewise?