javascript - How to console.log in webgl shaders? -


i'm trying understand how simulate console.log in webgl shaders written in glsl. it's easy error messages can't how print custom messages.

basically want print stuff in browser's console:

<script id="shader-fs1" type="x-shader/x-fragment">   void main(void)    {      //console.log doesn't work here since it's glsl not javascript     gl_fragcolor = vec4(0.0, 0.0, 0.0, 1.0);    }  </script> 

any suggestions?

not sure if possible, may want check out the webgl inspector library debugging purposes.


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -