kyptov Posted May 18, 2017 Share Posted May 18, 2017 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 Quote Link to comment Share on other sites More sharing options...
kyptov Posted May 18, 2017 Author Share Posted May 18, 2017 I extended SpriteManager to support Log Depth https://gist.github.com/kyptov/5aa6aecab2a78a9a21906fe03bbd69ae Can be used as workaround. Quote Link to comment Share on other sites More sharing options...
hunts Posted May 18, 2017 Share Posted May 18, 2017 @kyptov hy there: here is what you looking: http://www.babylonjs-playground.com/#WICWQN#1 Quote Link to comment Share on other sites More sharing options...
kyptov Posted May 19, 2017 Author Share Posted May 19, 2017 12 hours ago, hunts said: @kyptov hy there: here is what you looking: http://www.babylonjs-playground.com/#WICWQN#1 No, you just disabled useLogarithmicDepth for all materials. Quote Link to comment Share on other sites More sharing options...
hunts Posted May 19, 2017 Share Posted May 19, 2017 @kyptov what you're trying to do is not clear, elaborate on your question more Quote Link to comment Share on other sites More sharing options...
kyptov Posted May 19, 2017 Author Share Posted May 19, 2017 @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. Quote Link to comment Share on other sites More sharing options...
Iam Fonky Posted December 6, 2021 Share Posted December 6, 2021 @kyptov Any updates for this problem or you're still using your workaround? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.