Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - yiran

Pages: [1]
1
NGUI 3 Support / Re: How the UISprite to gray?
« on: November 26, 2014, 08:06:12 AM »
Look at the standard NGUI shaders, notice the postfixes like " 1" and " 2" in shader names, check the code that handles NGUI materials. As clipping is done through shaders, you must prepare clipping compatible duplicates of any custom shader you use in UI, and name them in the same way so that NGUI can find them.

I'm not sure I understand why would you want to use custom shaders at all, though. What's wrong with using standard vertex color driven coloration from NGUI tools?

Can you tell me where to use NGUI tools? Thank you very much

2
NGUI 3 Support / How the UISprite to gray?
« on: November 26, 2014, 04:38:56 AM »
Hi,I Modify NGUI built-in Shader “Unlit/Transparent Colored”, Use it to make UISprite gray.
 
Code:
   fixed4 frag (v2f IN) : COLOR
   {
             fixed4 col = tex2D(_MainTex, IN.texcoord);
             col.rgb = dot(col.rgb, fixed3(.222,.707,.071));
             return col;
   }

Normal use there is no problem,But when UIPanel Use the Clipping function, An Error Has Occurred!

Error : Unlit/Transparent Colored gray shader doesn't have a clipped shader version for 1 clip regions

Or what better way to solve the problem?Thank you very much!

Pages: [1]