Quantcast
Channel: Questions in topic: "grayscale"
Viewing all articles
Browse latest Browse all 81

SetMaterial don't works with canvasRenderer

$
0
0
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

Viewing all articles
Browse latest Browse all 81

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>