Jump to content

useLogarithmicDepth and Sprite


kyptov
 Share

Recommended Posts

I am building space game with big distances. To avoid glitches I use `material.useLogarithmicDepth = true;` And I found that all materials on scene need to be set to useLogarithmicDepth = true.

I using Sprite and got problem: mesh with logarithmic material renders in front of sprites.

http://www.babylonjs-playground.com/#WICWQN - Here a tree is on position in front of cube, but looks like this tree inside the cube.

Is this a way to bypass this behaviour?

P.s. I can not disable useLogarithmicDepth

Link to comment
Share on other sites

@hunts , SpriteManager does not support useLogarithmicDepth and it is a problem. I cannot disable useLogarithmicDepth because of glithes, glithes are because of big distance. I dont want to minimize difference beetween camera.minZ and camera.maxZ. I did not find a way to do it BABYLON, so I decided to extend SpriteManager. The solution is in second post.

Link to comment
Share on other sites

  • 4 years 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...