WebGL-Inspector icon indicating copy to clipboard operation
WebGL-Inspector copied to clipboard

Profile vertex- and fragment-shaders

Open empaempa opened this issue 13 years ago • 5 comments

Hey! Thanks for a fantastic tool, it has helped me over and over again.

At the moment I'm trying to figure out a way to profile vertex- and fragment shaders. This has proven quite difficult, as it seems as .drawElements runs in a separate thread, and that's why I turn to you. Any ideas?

empaempa avatar Mar 15 '11 09:03 empaempa

Thanks for the suggestion! This is actually something I plan on working on fairly soon. It will require some custom browser support, though, because of the issue you mentioned and I may only be able to get it going in Chrome.

benvanik avatar Mar 17 '11 18:03 benvanik

Fantastic news! Chrome support will do it for me, at least. I'm working on a big WebGL-project for a very well-known customer and I'm in need of all kinds of tools that help development. Is there anyway I can help you move faster on this feature?

empaempa avatar Mar 18 '11 08:03 empaempa

I came to think of a way to actually profile a draw-call: do a readPixels right afterwards. The readPixel has to wait for the draw call to finish to be able to read back the right pixels. What do you think?

empaempa avatar Apr 01 '11 15:04 empaempa

I read up a bit and there's an interesting function called gl.Finish which could be use to profile calls. If I get some time I'll look into it.

empaempa avatar Apr 04 '11 16:04 empaempa

relevant. Browser specific implementations :-1:

nickdesaulniers avatar Mar 03 '14 23:03 nickdesaulniers