# WebGPURender with logarithmicDepthBuffer is not work!

**URL:** <https://discourse.threejs.org/t/webgpurender-with-logarithmicdepthbuffer-is-not-work/68852>\
**Category:** Questions\
**Tags:** logarithmicdepthbuffer\
**Created:** [August 2, 2024, 1:10am UTC](https://discourse.threejs.org/t/webgpurender-with-logarithmicdepthbuffer-is-not-work/68852 "2024-08-02T01:10:42Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Attila\_Schroeder](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/attila_schroeder/32/36097_2.png) [@Attila\_Schroeder](https://discourse.threejs.org/u/Attila_Schroeder)\
**Post date:** [August 3, 2024, 11:42am UTC](https://discourse.threejs.org/t/webgpurender-with-logarithmicdepthbuffer-is-not-work/68852/3 "2024-08-03T11:42:53Z")

</div>

The logarithmic depthbuffer in webgpu works very well. I use it. You have to use the depthNode in webgpu if you use the logarithmic depthbuffer with custom raw shaders.

> [@A little advertising for the three.js node system and WebGPU](https://discourse.threejs.org/t/a-little-advertising-for-the-three-js-node-system-and-webgpu/67804):
>
> I only work with WebGPU and therefore with the three.js node system. In the meanwhile WebGPU is very well integrated in three.js. These are screenshots of my WebGPU original sized planet generator. I am not ready yet. I now have to add rock and sand textures to the surface. I would ideally have over 200k of data for the elevation profile, but the best thing NASA has so far as a coherent map is the Mars MOLA map with 46k. With that my virtual texture sys…

My whole app works with the logarithic depthbuffer. Works great 😊 And my app is huge.  
In webgl you operated the depth buffer from the fragment shader. In webgpu there is an extra node for the depth buffer because wgsl works a little differently.

Three.js even has an example with the logarithmic depthbuffer in webgpu

[https://threejs.org/examples/?q=loga#webgpu\_camera\_logarithmicdepthbuffer](https://threejs.org/examples/?q=loga#webgpu_camera_logarithmicdepthbuffer)

 ![Screenshot_20240803_135305_GitHub](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/5/a/5a6001709ca1ed74b4416ac785435b6429daf6b4.jpeg)

In the screenshot you can see the webgpuRenderer and that the logarithmic depth buffer is active. The example is up to date with r167. It uses `three.webgpu.js` instead of `three.module.js` but that all worked since at least r161with `three.module.js`. The logarithmic depth buffer is therefore fully integrated into the webgpuRenderer. However, if you want to avoid the node materials and use your own shaders like I do, then you will have to operate the depthNode yourself. If you ignore it you will get your error messages.

Regarding the general status of webgpu in three.js:  
I’m working very intensively with webgpu. I only work with webgpu. Three.js has changed its architecture with r167. The node system is now in the src folder and no longer in examples/jsm/, which I personally think is very good. With three.webgpu.js, three.js is also completely set up for webgpu. I assume in order to be able to maintain webgpu completely independently of webgl in the future. The webgpu system already works very extensively. I don’t miss anything from webgl anymore because the webGPURenderer and the node system meanwhile offer everything I know from webgl.

---

_[View the full topic](https://discourse.threejs.org/t/webgpurender-with-logarithmicdepthbuffer-is-not-work/68852)._
