I use WebGLRenderer’s info object to check the triangle count in my application.
In the normal browser mode, the triangle count seems as expected and everything is fine.
Although, when I switch to the VR mode everything seems doubled. Triangle count, draw calls, geometries, etc.
Is this the right behaviour? Is this happening because the GPU has to render the same scene into every lens (i.e Left lens and right lens at the same time)?
Or is this an issue in my code/bug in the library?
Any information regarding this will be appreciated.
Yes, the scene has to be rendered twice for each sub camera representing the left and right eye.
renderer.info.render should be affected by this. Not
So do you mean to say that the geometries/textures count should remain constant in both Browser/WebXR mode ?
It would be confusing if this is not the case.
Well it does seem to double the geometries/textures in my case. Just tested a minute back
I can’t image how this can happen. E.g.
memory.geometries is only increased when the renderer encounters a geometry for the first time. That is not true when rendering in XR with multiple sub cameras.
When I use this example (On Rift S), the behaviour is similar to what you mentioned above. The geometry and texture count remains the same. (three.js v r112)
Although, when I am testing my application on a latest version of three.js (r127) where the geometry/texture count does not remain the same. Likely a bug in the library or something in my code?
Like I said before, I can’t image how this could happen in
If the official WebXR examples have wrong stats, I suggest you file a bug at GitHub.
Ok if its the case, I shall do that Can you point me to an official three.js VR example which has inbuilt stats ? I could not find one at the moment.
Not sure what you mean by “inbuilt”. You can debug
renderer.info in all
three.js applications. It’s best to set a break point in the animation loop.
three.js dev tools also output the stats from