Hi,
I have this shader that doesn’t really do anything yet. for some reason, however, I get “syntax error” where I define the varying vec4 “uv”
Shader "Blocker/FloorScreen"
{
Properties
{
floorTex ("Floor", 2D) = "white" {}
}
SubShader
{
Pass
{
GLSLPROGRAM
uniform sampler2D floorTex;
varying vec4 uv;
#ifdef VERTEX
void main()
{
uv = gl_MultiTexCoord0;
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
}
#endif
#ifdef FRAGMENT
void main()
{
gl_FragColor = texture2D(floorTex, vec2(uv));
}
#endif
ENDGLSL
}
}
}
I simply can’t see what’s wrong with this oO