Custom shader sprite flipping doesn't work

Did something change with the shader backend? When creating a custom sprite shader flipping renderer X and Y no longer does anything. Seems to work in 5.5 but not 2d preview.
To reproduce:

  1. Download 5.5 shaders from Unity
  2. Copypaste default sprite shader into a new file
  3. Create material with new shader and use it in a sprite renderer
  4. Flipping the renderer doesn’t do anything unless it’s one of the default built-in materials.

The 2d preview shaders aren’t public so I can’t check for myself. Is there something we need to change in our shaders?

As a workaround, the old way of setting scale to -1 still works.

We moved the flip to the shader so if you have custom shader and old shaders, it will need to do some more work.

However, after considering some feedbacks, we might backtrack on this. Stay tuned.

yes not everyone can rewrite shaders, or rely on asset store packages to be updated.
Please try not to break anything unity, and if you have to make it upgrade the shaders automaticly

1 Like