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 | 969 | January 21, 2023 | |
Use actual depthBuffer as texture in shader | 2 | 1596 | November 25, 2019 | |
How to create effect of depth using fragment shader? | 4 | 515 | August 23, 2021 | |
Reading from depth texture | 3 | 1830 | May 12, 2023 | |
DOF with ShaderMaterials | 0 | 351 | March 12, 2023 |