Flipping Sprite Renderer as of unity 5.3 with negative scale effects lighting when using bump map.
After updating to Unity 5.3 my sprite flipping using negative x scale effects the lighting. This happens only with shaders that have a normal(bump) map. I can not rotate the sprite to get the flip at this time given a large amount of rework this would intel.
Thanks for any advice.
Jeremy
Answer by Mothalius · Dec 31, 2015 at 04:39 AM
Not sure what you're specifically asking, but if you just want to flip a 2D sprite:
GetComponent<SpriteRenderer>().flipX = true;
Works fine for me, doesn't affect lighting/colliders/raycasts.
I will give this a try, I have been just taking scale.x and setting it to -scale.x thus negative scale. Do we have any idea what flipX does?
thx
Answer by jrhowa · Jan 05, 2016 at 05:40 PM
This has been fixed... A few things come into play in finding out what was going on..
The light change was caused by the directional light.. Remove the light and the change in brightness went away.. This lead me to the shader that I was using. ( Shader Forge ), in the Geometry Tab I set the Normal Quality to Interpolated and the change in lighting when flipping the sprite was fixed.
Thanks Mothalius for your input as well..
jer