That looks like a combination between Cg and GLSL. “float3” does not exist in GLSL. It’s “vec3” there. Furthermore, GLSL doesn’t allow binding to an attribute using a semantic string.
You should use gl_Normal, gl_Color and gl_Vertex etc., which you don’t need to declare. This is a normal thing to do in GLSL shaders. I would advise following some GLSL tutorials if you are having trouble with using GLSL.
In 1.8.0 and above, you’ll also be able to declare custom attribs like “varying vec4 normal” and Panda will bind them automatically to a vertex column of the same name.
Hello,
I thought I re-open this thread instead of starting a new one.
:gobj(error): Shaders/fpWaterDM.sha: varying in vec4 IN.HPOS: parameter should b
e declared 'uniform'
:gobj(error): Shaders/fpWaterDM.sha: varying in vec4 IN.COL0: parameter should b
e declared 'uniform'
:gobj(error): Shader encountered an error.
Your shader doesn’t make any sense. “POSITION” is an output semantic for the vertex shader. I’m not sure what that shader’s supposed to do. It’s a fragment shader, yet it has a vertex input? Why do you name your vertexOut parameter “IN”; which one is it, in or out?
I also recommend against using keywords like HPOS as variable names, it’s confusing.