BabylonJS/Spector.js

Show GLSL errors / warnings in the shader editor

JannikGM opened this issue · 2 comments

There should be an option to display GLSL errors and warnings in the editor.
Ideally, this would be shown in the respective lines.

The underlying editor supports this: https://mkslanc.github.io/ace-playground/#providing-custom-annotations
There's also some parser for GLSL errors / warnings in luma.gl that could be repurposed.

This is especially relevant after fixing #278; ideally, gl.getShaderInfoLog or gl.compileShader (and respective gl.linkProgram etc.) would also allow to jump to the editor (which could include said annotations).

There's also some parser for GLSL errors / warnings in luma.gl that could be repurposed.

Looks like parsing the messages is trivial: https://github.com/visgl/luma.gl/blob/b9194eeee698868cdaee87b28f2992f150a61ae1/modules/webgl/src/adapter/helpers/parse-shader-compiler-log.ts

I thought the format would be much less consistent.

closing in favor of #283

Spector has never been thought as a tool to help during shader development and it would be great to enhance this area.