My post-processing scene consists of a postFragmentShader and postVertexShader, and its purpose is to obtain depth information. The sphereFragmentShader is part of a sphere ShaderMaterial that is rendered within the post-processing scene. I aim to utilize the depth texture in the sphereFragmentShader for performing ray-to-sphere intersection calculations in my sphereShader. However, I am uncertain about the method to pass the depth information to the shader or whether this approach is appropriate. Any guidance would be greatly appreciated.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Get depth in post processing shader | 1 | 1371 | January 21, 2023 | |
Value of depth in ShaderPass with depth | 2 | 69 | July 3, 2024 | |
Use actual depthBuffer as texture in shader | 2 | 1911 | November 25, 2019 | |
How to create effect of depth using fragment shader? | 4 | 723 | August 23, 2021 | |
Reading from depth texture | 4 | 2653 | July 8, 2024 |