Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: bac9 on June 10, 2014, 09:21:41 AM
-
Can someone point me to proper way of exposing shader tint color to NGUI? Every single shader shipping with NGUI has no such property, yet somehow every texture and every sprite still supports tinting. How is it achieved? I'm mostly interested in that to get UITexture elements with custom shaders working with NGUI inspector tinting, as creating materials and dragging them into UITexture material slot every time you need to update a color isn't the most convenient workflow.
I tried few widespread naming conventions like _Color and _Tint, but NGUI seems not to search for properties named like that. What is it using then?
-
I believe it uses vertex colours for tinting sprites in the default shaders.
-
It makes no sense for NGUI's shaders to use a material-set color because it would be global, and NGUI's draw calls contain many widgets.
As Simie pointed out, NGUI's widgets use vertex colors instead.