glslify / glslify/glsl-tokenizer
Approach to built-ins
- Dominant language
- JavaScript
- Stars
- 52
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
Currently if a builtin isn't hard-coded it could break shaders (for example, `fwidth` not being listed might get mangled to `fwidth_2_1`). As WebGL2 and new extensions come to browsers, we should be wary of new functions/constants.
Some things not listed in the built-ins:
- pragmas like `GL_ES` and `__VERSION__` -- not sure if that matters tho
- gl_MaxFragmentUniformVectors, gl_MaxVaryingVectors, gl_MaxVertexUniformVectors
- I added dFdx / dFdy, but there is also fwidth
- transpose (GLES 3)
Some other things like gl_InstanceID, gl_ClipDistance, outerProduct, shadow2DProj, etc may or may not eventually end up in WebGL (in spec or through extensions).
Maybe there is another way of handling this? Like only mangling function names when necessary?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.