Unity 2017.3b2 WebGL - SV_POSITION vs VPOS
Posted: Fri Sep 28, 2018 9:05 am
Hello!
I recently switched an existing project to 2018.3b2, and made sure to update ASE to the latest Asset Store version.
When building for WebGL, two of my shaders generate the following error :
duplicate system value semantic definition: input semantic 'SV_POSITION' and input semantic 'VPOS' at line 144 (on gles)
The shaders work fine on other platforms.
By opening the shader code, I get to the following generated line :
which is the line ponted by the compiler.
Replacing manually by
fixes it.
I recently switched an existing project to 2018.3b2, and made sure to update ASE to the latest Asset Store version.
When building for WebGL, two of my shaders generate the following error :
duplicate system value semantic definition: input semantic 'SV_POSITION' and input semantic 'VPOS' at line 144 (on gles)
The shaders work fine on other platforms.
By opening the shader code, I get to the following generated line :
- Code: Select all
fixed4 frag( v2f IN
#if !defined( CAN_SKIP_VPOS )
, UNITY_VPOS_TYPE vpos : VPOS
#endif
) : SV_Target
which is the line ponted by the compiler.
Replacing manually by
- Code: Select all
fixed4 frag( v2f IN
#if !defined( CAN_SKIP_VPOS )
, UNITY_VPOS_TYPE vpos : SV_POSITION
#endif
) : SV_Target
fixes it.