import { vs_simple } from '../glsl/vs-simple-basic.glsl.js'
Does anybody know why I’m getting the following error?
THREE.WebGLProgram: Shader Error 0 - VALIDATE_STATUS false
Program Info Log: Must have a compiled fragment shader attached:
SHADER_INFO_LOG:
ERROR: 0:33: 'main' : syntax error
FRAGMENT
ERROR: 0:33: 'main' : syntax error
..
When I run the demo I can see the rest of the error message. See line 33 (in the error message), it is marked by >. There is missing ; after the definition of reoslution and before void main():
I don’t know. It might be in some of the shader chunks that are used to compose shaders. If you add an extra ; just before void main will it patch the error?
It is defined in WebGLProgram.js. This function is constructed at run-time, it does not exist as a hard-coded definition. Line 693 activates the generation of the function:
I have never needed to rebuild (or recompile) Three.js, and I have never done it. Maybe someone more experienced with that will help.
However, my intuition says that this is the wrong way to go.
You should not need to go that deep, unless there is a fundamental bug in Three.js, which is very unlikely. Most likely there is something wrong with the setup, or you are doing something manually, or something is misconfigured.
Also, check what Three.js version is used in the book. If it uses older version, it might have different files.