- Home /
Question by
annonymushubh · Aug 03, 2017 at 06:42 AM ·
errorshaderunity5fix
I have error in Shader transparent/Refractive
I have no idea about that what is going on because i have not any knowledge of Shader programming
i have a error
Shader error in 'Transparent/Refractive': 'vert': output parameter 'o' not completely initialized at line 66 (on d3d9)
Compiling Vertex program with DIRECTIONAL
Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA
What should i do to fix this error?
This is the code where we found the error
void vert (inout appdata_full v, out Input o)
{
#if SHADER_API_D3D11
UNITY_INITIALIZE_OUTPUT(Input, o);
#endif
o.position = UnityObjectToClipPos(v.vertex);
#if UNITY_UV_STARTS_AT_TOP
float scale = -1.0;
#else
float scale = 1.0;
#endif
o.proj.xy = (float2(o.position.x, o.position.y * scale) + o.position.w) * 0.5;
o.proj.zw = o.position.zw;
}
how i fix it .
Comment
Answer by Namey5 · Aug 04, 2017 at 09:35 AM
Try removing the stuff surrounding the 'UNITY_INITIALIZE_OUTPUT (Input, o);', i.e.
Remove;
#if SHADER_API_D3D11
//& also remove
#endif
Because there may be some compilation errors on certain platforms.