Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Custom shader sprite flipping doesn't work

Discussion in '2D Experimental Preview' started by Scorr, Jan 12, 2017.

  1. Scorr

    Scorr

    Joined:
    Jul 2, 2013
    Posts:
    73
    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.
     
  2. ColossalPaul

    ColossalPaul

    Unity Technologies

    Joined:
    May 1, 2013
    Posts:
    174
    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.
     
  3. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,513
    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
     
    Noxury likes this.