0

2d sprite opacity clip shader works in properly editor but not in play mode

Nalin Sharma 8 aastat tagasi 0

Hi


I have the shader below that fills a percentage of a 2D sprite. This works in the editor fine when applied to a sprite in a UI Canvas using values of 0 to 1 (empty to full). However in play mode the sprite fills from 0.43 (empty) to 0.67 (full) rather than using the range 0 to 1.


Can anyone think why this might happen?

Image 727