It looks like you're new here. If you want to get involved, click one of these buttons!
FragmentShader:I took the normalmap shader and added some maths to make lights to falloff with distance:
0:17: P0004: High precision not supported, instead compiling high precision as medium precision
0:13: S0052: Uniform variable with initializer
uniform vec3 Falloff = vec3(0.1,0.2,0); |
Comments
https://github.com/mattdesl/lwjgl-basics/wiki/ShaderLesson6
I thought the error was from Falloff = vec3(0.1,0.02,0); but I have the same error using
Falloff = vec3(0.1,0.2,0);
Thank you
You simply can't give a value to a uniform, uniforms take their value from outside the shader (ie C code or lua).
For the records, I was also missing precision declarations on other variables: ie
mediump float D = length(LightDirection);