Author Topic: soft clip panel error  (Read 8773 times)

alexeyshevchenko

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 12
    • View Profile
soft clip panel error
« 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?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: soft clip panel error
« Reply #1 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.

helmesjo

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 116
    • View Profile
Re: soft clip panel error
« Reply #2 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?
« Last Edit: August 14, 2014, 05:16:42 AM by helmesjo »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: soft clip panel error
« Reply #3 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.

helmesjo

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 116
    • View Profile
Re: soft clip panel error
« Reply #4 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.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: soft clip panel error
« Reply #5 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.