Hello. I want to add grayscale filter to Image object in Unity UI. I found this [grayscale shader][1]. In my code I have created material and tried to use it like this:> image.canvasRenderer.SetMaterial(material, image.mainTexture);
But nothing was changed. Maybe I have to write totally different shader, when I works with canvas objects?
UPD: I rewrote shader with UI/Default as a base, but no effect too. Maybe shaders must be added to UI elements some other way?
[1]: http://pastebin.com/pG3YKwrU
↧