glsl-language-toolkit icon indicating copy to clipboard operation
glsl-language-toolkit copied to clipboard

Error with `#extension` preprocessor directive

Open jsangmeister opened this issue 1 month ago • 0 comments

I get the following error:

error printing {"kind":"ppExtension","extension":{"image":"GL_OES_standard_derivatives","startOffset":11,"endOffset

error printing {"kind":"translationUnit","declarations":[{"kind":"ppExtension","extension":{"image":"GL_OES_standar


[error] shader.frag: Error: unexpected n type ppExtension
[error] {"kind":"ppExtension","extension":{"image":"GL_OES_standard_derivatives","startOffset":11,"endOffset

(unabriged, the print statements are simply cut off)

These appear on the following lines:

#extension GL_EXT_frag_depth : enable

and

#extension GL_OES_standard_derivatives : enable

I am not that fluent in GLSL, is that non-standard syntax and should I write this in another way? Or is this a bug in your formatter? In any case, the error message could be more helpful 😅

Thank you for your tool! If this is resolved, we will finally be able to automatically format our shader files 😄

jsangmeister avatar Oct 22 '25 13:10 jsangmeister