how to pass single float to gl shader?

I’m stuck again

python part:

snowplane.setShaderInput("snowHeight", Vec4(0.0, 0, 0, 0))

glsl part:

uniform vec4 k_snowHeight;

Shader compiles with no errors and it renders the first frame.

But when I start to move around with mouse I get this error:

Assertion failed: Shader input k_snowHeight is not present.
 at line 382 of c:\panda_cvs\panda\src\pgraph\shaderAttrib.cxx
Traceback (most recent call last):
  File "c:\Panda3D-1.7.0\direct\showbase\ShowBase.py", line 1678, in __igLoop
    self.graphicsEngine.renderFrame()
AssertionError: Shader input k_snowHeight is not present.
 at line 382 of c:\panda_cvs\panda\src\pgraph\shaderAttrib.cxx
:task(error): Exception occurred in PythonTask igLoop
Traceback (most recent call last):
  File "GraderSimulator.py", line 401, in <module>
    run()
  File "c:\Panda3D-1.7.0\direct\showbase\ShowBase.py", line 2532, in run
    self.taskMgr.run()
  File "c:\Panda3D-1.7.0\direct\task\Task.py", line 502, in run
    self.step()
  File "c:\Panda3D-1.7.0\direct\task\Task.py", line 460, in step
    self.mgr.poll()
  File "c:\Panda3D-1.7.0\direct\showbase\ShowBase.py", line 1678, in __igLoop
    self.graphicsEngine.renderFrame()
AssertionError: Shader input k_snowHeight is not present.
 at line 382 of c:\panda_cvs\panda\src\pgraph\shaderAttrib.cxx

there is no problem with displacementMap nor colorMap

In GLSL shaders, you shouldn’t use the k_ prefix.

doh, I even tried that before but as I saw no changes I assumed it didn’t work.

so even if I pass

        self.snowplane.setShaderInput("snowHeight", Vec4(100, 100, 100, 100))

the displacement is still the same

//GLSL
uniform sampler2D displacementMap;
uniform vec4 snowHeight;


#define plane_size 1000
	
#define max_height 60.0	// black value
#define min_height 0
void main(void)
{
	vec4 newVertexPos;
	vec4 dh;
	float du;
	float dv;
	float df;

	// convert real world coordinate to texture coordinate
	du = (gl_Vertex.x / (plane_size))+0.5; 
	dv = (gl_Vertex.y / (plane_size))+0.5;
	vec2 uv = vec2(du, dv);
	gl_TexCoord[0].x = du*20; // tile texture 20 times
	gl_TexCoord[0].y = dv*20;
	
    dh = texture2D( displacementMap, uv);
	
	df = max_height - dh.z*max_height + snowHeight.x;
	newVertexPos = vec4(gl_Normal * df, 0.0) + gl_Vertex;

	gl_Position = gl_ModelViewProjectionMatrix *  newVertexPos;
}