Jump to content

Ejecta and babylon : Z-Buffer issue ?


demonixis
 Share

Recommended Posts

Hi there,

 

I'm working on the port of a webgl app using Babylon and Ejecta. It seem that i've a z-buffer issue but I don't know if the problem is from Babylon or from Ejecta. I made a video that you can watch here which show you the problem.

 

I tested different configurations with camera projection (minZ and maxZ) but it hasn't solved my problem. Have you an idea ? In fact I don't know where to start to debug this issue.
 
Thanks for your answers ;)
 
Yann.
Link to comment
Share on other sites

The issue is that sometime Babylon.js during clear does not test if depthMask is enabled, this is known OpenGL stuff, something like this would fix this issue:

var depthWriteMask = this._gl.getParameter(this._gl.DEPTH_WRITEMASK);// Enable depth mask when clearing depth buffer.                if (!depthWriteMask)                    this._gl.depthMask(true);                this._gl.clearDepth(1.0);.. clear// Reset buffer write stateif (!depthWriteMask) {     this._gl.depthMask(false);  }
Link to comment
Share on other sites

  • 10 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...