BabylonJS / Spector.js

Explore and Troubleshoot your WebGL scenes with ease.

Home Page:http://spector.babylonjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Group render calls by render target

mvaligursky opened this issue · comments

At the moment we see a big list of render calls. I would be good to have these separated to groups by render target. A one level hierarchy, where top level would be a render target name (if set by __SPECTOR_Metadata), and next level would be render calls in it. This way you could easily see what renders to shadow map, cube map, main camera ...

The render target group would ideally be collapsible, and also would display number of render calls inside the group.

hi @sebavan ,

thanks for your response. I didn't know about setMarker, and tried it just now. And I'm not sure what I'm supposed to see, but I cannot see anything different in the capture.

Each time I set framebuffer, I call

if (window.spector) { console.log("marker: " + layer.name); window.spector.displayUI(); window.spector.setMarker("Layer: " + layer.name); }

and this after rendering to it is done

if (window.spector) window.spector.clearMarker();

I can see logs taking place as expected. SpectorJS menu shows up in the application. When when I capture either using Chrome extension, or in game menu, I don't see any markers in capture. I'm not even sure what they are supposed to look like.

I also tried this on vertex buffers, and that works and I see it in capture.
this.bufferId.__SPECTOR_Metadata = { name: "XXXXXXXX" };
Any help would be appreciated.

Marker should appear in the result like this:
image

See the left hand side of the commands as a CLEAR/ATTRIBS/UNIFORMS keyword you can search on with the search.

You can add them with:
https://github.com/BabylonJS/Spector.js/blob/master/sample/js/customMarker.js#L228

They are enabled until you make another call into it:
https://github.com/BabylonJS/Spector.js/blob/master/sample/js/customMarker.js#L258

If it is not working for you, could you share a repro ???

Ah got it to work, I was calling it on wrong place it turns out.
I'll close this, as marker based solution is good enough.
One tiny note - could you perhaps change the color or that marker text? At the moment its the same as color of some 'enable' commands, making it less clear. Ideally a unique color for just marker should be used.
Thanks.

Yup that is a nice suggestion :-)