Webgl shader debugger, variable inspection

冷暖自知 提交于 2019-12-23 09:56:53

问题


I am looking for a javascript which allows me to debug a WebGL shader down to the single line / variable level. So it should be possible break on every line and inspect the value of every variable.

This can be done by instrumentation (parsing the shader, generating a shader which outputs the requested variable, execute this shader against the current context and returns the ouput to the user)

It is similar to what glslDevil (http://www.vis.uni-stuttgart.de/glsldevil/) does for OpenGL.

Does anyone know if such a tool for WebGL exists ?


回答1:


Firefox, at at least v38, has a debugging panel for WebGL GLSL shaders. You are able to edit and quickly recompile them for debugging purposes. I don't believe it allows for breakpoints in individual lines though.

You can enable it through the gear panel:

And then use it in the Shader Editor panel



来源:https://stackoverflow.com/questions/23806619/webgl-shader-debugger-variable-inspection

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!