Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: seunghwan.lee on November 26, 2015, 03:50:05 AM

Title: Refractive shader error(Unity5)
Post by: seunghwan.lee 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)

Title: Re: Refractive shader error(Unity5)
Post by: ArenMook 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.
Title: Re: Refractive shader error(Unity5)
Post by: hummada23 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!
Title: Re: Refractive shader error(Unity5)
Post by: hummada23 on December 14, 2016, 03:41:01 PM
Sorry I should add - by 'latest version of Unity' I mean 5.5.0f3.
Title: Re: Refractive shader error(Unity5)
Post by: ArenMook 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.
Title: Re: Refractive shader error(Unity5)
Post by: hummada23 on December 15, 2016, 11:45:05 PM
That worked, thanks!