Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: alexeyshevchenko on May 23, 2014, 07:30:52 AM
-
Hi!
in my shop panel is used. i get error - Unlit/Transparent Cutout shader doesn't have a clipped shader version for 1 clip regions
what is the reason?
-
That shader doesn't come with NGUI (at least not the recent versions) and as such it doesn't support clipping.
-
That shader doesn't come with NGUI (at least not the recent versions) and as such it doesn't support clipping.
So how does one go about supporting clipping for custom shaders? I've got a masked shader, but I also need it to be "flippable".
Edit. Oh, so you determine by shader-name? Wow... Why? Was there no more usable way? Like, just a property fetched from the shader telling nr. of clips supported?
-
Yes, shader replacement going by shader name. The only other alternative would be to have one shader, but have #ifdefs inside and use multi-compilation. Multiple shader approach is cleaner as it's easier to read, at least for me.
-
Yes, shader replacement going by shader name. The only other alternative would be to have one shader, but have #ifdefs inside and use multi-compilation. Multiple shader approach is cleaner as it's easier to read, at least for me.
Alright.
Well the problem is that you limit the folder-path to your internal one. If I want clipping, I'll have to place my shader among yours (HIDDEN/Unlit/) to "fake" it so I don't get the clipping-warning. You should instead just look for shaderName + mClippingCount in the same folder as the current shader IMO, and get rid of all the string-checks.
-
Shader.Find goes by shader name rather than filename. I could use Resources.Load though... I'll think about it.