- Home /
Shader error with SurfaceOutput.Normal
Hi all!
I wrote a shader to texture land in my world: http://pastebin.com/UwQMyuAb
It works nice, until I tried to set o.Normal. No matter to what I try to set it, It throws many Shader errors in console
Shader error in 'Custom/TerrainMapper': Program 'frag_surf', expression left of ."TtoW0" is not a struct or array at line 162
Keywords: DIRECTIONAL, LIGHTMAP_OFF, DIRLIGHTMAP_OFF, SHADOWS_OFF
Shader error in 'Custom/TerrainMapper': Program 'vert_surf', expression left of ."TtoW0" is not a struct or array at line 162
Keywords: DIRECTIONAL, LIGHTMAP_OFF, DIRLIGHTMAP_OFF, SHADOWS_OFF
Shader error in 'Custom/TerrainMapper': Program 'frag_surf', expression left of ."TtoW1" is not a struct or array at line 163
Keywords: DIRECTIONAL, LIGHTMAP_OFF, DIRLIGHTMAP_OFF, SHADOWS_OFF
Shader error in 'Custom/TerrainMapper': Program 'vert_surf', expression left of ."TtoW1" is not a struct or array at line 163
Keywords: DIRECTIONAL, LIGHTMAP_OFF, DIRLIGHTMAP_OFF, SHADOWS_OFF
Shader error in 'Custom/TerrainMapper': Program 'frag_surf', expression left of ."TtoW2" is not a struct or array at line 164
Keywords: DIRECTIONAL, LIGHTMAP_OFF, DIRLIGHTMAP_OFF, SHADOWS_OFF
Shader error in 'Custom/TerrainMapper': Program 'vert_surf', expression left of ."TtoW2" is not a struct or array at line 164
Keywords: DIRECTIONAL, LIGHTMAP_OFF, DIRLIGHTMAP_OFF, SHADOWS_OFF
The same errors to all values of o.Normals commented in code. With all o.Normal assignments commented, there are no errors in the shader.
P.S. in editor, world "Normal" has blue color, like basic language utils.
Comment
Your answer
Follow this Question
Related Questions
[Need Help of a expert shader user] How to make following shaders to Fallback to "Diffuse"? 1 Answer
How can I make my own shader include file (.cginc or .glslinc)? 2 Answers
Best transparent shader for Android devices 1 Answer
Tracing in Unity3D 2 Answers
Is it possible to avoid writing to certain g-buffers? 1 Answer