Jaimi
January 14, 2017, 12:33am
1
I’m testing the UMA project under 5.6b3.
Compiling the shaders gives the following error:
unrecognized identifier ‘UNITY_SHADOW_COORDS’ at line 203 (on metal)
unrecognized identifier ‘UNITY_SHADOW_COORDS’ at line 136 (on glcore)
I didn’t see anything in the upgrade guide about shader changes, and google returns zero results on this macro.
This is a surface shader, and the usage appears to be in a struct in the generated source:
// vertex-to-fragment interpolation data
// no lightmaps:
#ifndef LIGHTMAP_ON
struct v2f_surf {
float4 pos : SV_POSITION;
float2 pack0 : TEXCOORD0; // _MainTex
float4 tSpace0 : TEXCOORD1;
float4 tSpace1 : TEXCOORD2;
float4 tSpace2 : TEXCOORD3;
fixed4 color : COLOR0;
half4 custompack0 : TEXCOORD4; // worldTangent_screenPosX
half4 custompack1 : TEXCOORD5; // worldBinormal_screenPosY
#if UNITY_SHOULD_SAMPLE_SH
half3 sh : TEXCOORD6; // SH
#endif
UNITY_SHADOW_COORDS(7)
UNITY_FOG_COORDS(8)
#if SHADER_TARGET >= 30
float4 lmap : TEXCOORD9;
#endif
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
};
#endif
Hi Jaimi,
Thanks for reporting this. Could you please file a bug report and reply in here with the case #?
Jaimi
January 16, 2017, 7:02pm
3
Already reported - Case 870523
I’m facing the same issues with Lux , has there been any update on the case?
I’m getting this when trying to use the blacksmith unique shadows. On the issue tracker page it says that the status of this bug is “By Design”.
What does this mean? Is it not going to be fixed because it’s a deliberate change? Surely there should be some sort of explanation so we can update our shaders?
Edit: Actually my error is slightly different. I get this:
Shader error in ‘Volund/Standard Character (Specular, Surface)’: invalid subscript ‘_ShadowCoord’ ‘UnityComputeForwardShadows’: no matching 3 parameter function at line 201 (on d3d11)
Seems to be very similar?
Hey @ArthurT
This is related to Lux asset and until it is upgraded to work with 5.6, here is a workaround solution suggested by our developer Florent (Jaimi received this as a e-mail):
The broken shader is ‘Lux/Anisotropic Lighting/Hair’ the file in the project is /Lux 2.01 Personal/Lux Shaders/Lux Custom Anisotropic Sahders/Anisotropic Hair.shader’.
To achieve it anisotropic look this shader use a custom “AutoLight.cginc” present in the same folder. The problem is that this custom “AutoLight.cginc” need to be upgraded to Unity 5.6 as this file has been quite heavily refactor between unity 5.5 and 5.6 on Unity side.
A comment from the “hacked AutoLight.cginc”
// Lux hacked AutoLight
// We use the “UNITY_LIGHT_ATTENUATION” macro to write out needed worldPosition (Area Lights) and worldTangent (Anisotropic Highlights)
// to our output structure o that gets sent to the lighting function.
// Only needed by forward lighting
It seems to me thus that the Lux shader framework should be upgraded to Unity 5.6 by its author Meantime a workaround is to (in the project folder) rename the “autolight.cginc” to “autolight_old.cginc” (or use the “autolight.cginc” from stock Unity 5.6). The shader will then compile just fine, however the anisotropic part of the modified “autolight.cginc” will still need to be reimplemented on top of Unity 5.6.
1 Like