Author Topic: Refractive shader error(Unity5)  (Read 22923 times)

seunghwan.lee

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
Refractive shader error(Unity5)
« on: November 26, 2015, 03:50:05 AM »
I have the following issues related to the Refractive shader.
My target platform is Windows/X86/Standalone... and NGUI ver is 3.8.x
Please tell me the workaround.

[ERROR]
Shader error in 'Transparent/Refractive': Program 'frag_surf', error X4506: ps_4_0_level_9_1 input limit (8) exceeded, shader uses 9 inputs. (on d3d11_9x)

« Last Edit: November 26, 2015, 04:17:56 AM by seunghwan.lee »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Refractive shader error(Unity5)
« Reply #1 on: December 01, 2015, 07:19:07 AM »
Seems to work fine in both 4.6.9 and 5.2.2p3. You need to update your NGUI.

hummada23

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 45
    • View Profile
Re: Refractive shader error(Unity5)
« Reply #2 on: December 14, 2016, 12:23:59 AM »
Hi ArenMook,

I've started getting this same problem with the latest release of Unity. I'm using the latest version of NGUI, although I've made modifications to some of NGUI's files, and in the process I've probably missed updating a file that I need to get this working.

Are you able to give me any hints on, say, what files I need to update to remove this error? I definitely have the latest version of the Refractive.shader file, but aside from that I don't know what else I need to get this to work.

Thanks again!

hummada23

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 45
    • View Profile
Re: Refractive shader error(Unity5)
« Reply #3 on: December 14, 2016, 03:41:01 PM »
Sorry I should add - by 'latest version of Unity' I mean 5.5.0f3.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Refractive shader error(Unity5)
« Reply #4 on: December 15, 2016, 09:18:01 AM »
The refractive shader it stand-alone, so I don't see why you'd have an issue with out all of a sudden. You can add #pragma target 4.0 to the shader to force it to use a higher shader target. I'm guessing that will have a higher limit too.

hummada23

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 45
    • View Profile
Re: Refractive shader error(Unity5)
« Reply #5 on: December 15, 2016, 11:45:05 PM »
That worked, thanks!