Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: alexeyshevchenko on May 23, 2014, 07:30:52 AM

Title: soft clip panel error
Post 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?
Title: Re: soft clip panel error
Post by: ArenMook on May 23, 2014, 04:12:23 PM
That shader doesn't come with NGUI (at least not the recent versions) and as such it doesn't support clipping.
Title: Re: soft clip panel error
Post by: helmesjo on August 14, 2014, 05:10:34 AM
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?
Title: Re: soft clip panel error
Post by: ArenMook on August 14, 2014, 08:11:12 AM
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.
Title: Re: soft clip panel error
Post by: helmesjo on August 14, 2014, 08:54:22 AM
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.
Title: Re: soft clip panel error
Post by: ArenMook on August 15, 2014, 07:13:55 AM
Shader.Find goes by shader name rather than filename. I could use Resources.Load though... I'll think about it.