I made a colorswap shader for a sprite using the Universal render pipeline and a 2d lit shadergraph. The problem is that it works fine actually in game, but in the scene view I just see a big purple blob. I attached an image that shows what is happening. On the right is the original sprite without shader that is working fine.
Its also there without the colour swap so I attached this sample. I use the UniversalRenderPipeLine with 2D renderer Data. I am on Unity 2019.4.17f1. The spritegraph 2d unlit says âexperimentalâ in this version but I tried upgrading and it is the same story (and broke so many things I reverted). I just find it weird that it displays correctly in the game view but not in the scene view.
Hmm, I think this is a bug? The pink color in your graph preview is normally used to signify that an objectâs shader is failing to compile, and so the object canât be drawn properly (the blob shape that youâre seeing is the sprite mesh that Unity generates when you use the âtightâ mesh type). But your shader clearly isnât failing to compile, and I donât see anything wrong with the example you posted.