Problems with WEBGL_depth_texture

I am using Cesium on Windows 10 with IE11 and Chrome. Graphics card is Geforce GT610. I am experiencing problems with depth-picking and would like to ask if someone has any workarounds to implement depth-picking without this extension.

Problems:

  • Chrome: if depth_texture is enabled, frame rate drops about 50-70% when whole window is covered with 3d-content. It drops even more if some content is transparent. My current idea is that maybe GT610 graphics driver or GPU itself has a performance problem whenever the WEBGL_depth_texture is attached during rendering.

If I make this change to Context.js:

https://github.com/AnalyticalGraphicsInc/cesium/blob/7213d4d25e02deab085448250c5dca966f1dbfcc/Source/Renderer/Context.js#L273

this._depthTexture = !!getExtension(gl, [‘WEBGL_depth_texture’, ‘WEBKIT_WEBGL_depth_texture’]);

=>

this._depthTexture = false;

… Rendering starts working 50-60fps in Chrome consistently. Any higher level depth-pick disable does not seem to do the trick, it has to be all the way disabled from low-level to get the higher frame rate.

  • IE11: depth_texture extension is not supported at all so I have not figured out if there is a way to get depth-pick working at all?

I would be happy to discuss and test some workarounds for this if someone has encountered similar issue.

Hi there,

Not sure why you see the frame rate drop so much with the extension enabled. For most FBOs, if we can’t use a depth texture attachment, we fall back to a depth renderbuffer. The only thing I can think of that we do that is sort of crazy is copy the depth after each frustum pass. That’s a full screen pass for each frustum (usually the max is 3 frusta with standard settings).

Try disabling depth picking (scene.useDepthPicking = false) to see if that’s the issue. Otherwise, it’s probably driver related. There is no workaround without MRT. Which, if depth textures don’t work well, would probably also not work well.

Hope that helps,

  • Rachel

Hi! Thanks for the reply, today I installed a new GT710 graphics card and it works fine now! Problem gone… It must be a problem with this very low-end GT610 chip…

Now I am left with this IE11 problem

  • IE11: depth_texture extension is not supported at all so I have not figured out if there is a way to get depth-pick working at all?

I have this kind of workaround in mind: I will store “feature’s” center point to feature metadata and use that to approximate picked point on IE11 - as there the color buffer works anyways, so I can get the picked feature id.

I investigated this more today, it appears that the framerate drop is caused by OIT! Not the depth-pick, as I first thougth. I disabled the OIT with an option for now and achieved an improvement from 25 fps to 50 fps with GT710 gfx-card.