You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a known problem, and there are two issues:
The parser does not have a way to specify if the input source code is vertex or fragment code. Right now the parser accepts a superset of GLSL that includes both valid vertex and fragment code. This is also called out in the limitations section of the readme.
The parser does not currently respect the "7.1 Built-In Language Variables" section of the Khronos grammar spec, which includes definitions for variables like gl_Position. Right now the parser does not auto-include global variables. I think I need to solve 1 before I can address 2.
One quick option you have for now is to parse with {quite: true} as a parser option. This will hide warnings for truly undefined variables, but it might work for your use case.
Hi - the following shader gives a warning:
Encountered undefined variable: "gl_Position"
is there a way to prevent this? Thanks for your library, so useful :)
The text was updated successfully, but these errors were encountered: