0

Proper Depth Texture Distortion for High Quality Refraction

astrand130 10 lat temu zaktualizowano 10 lat temu 1
Hello,
Would it be possible to distort the screen-space depth texture mapping for nodes such as SceneDepth when using shader-forge's refraction? It would be very useful for creating refractive shaders that require pixel depth information for scattering effects (It may seem minor, but when used with water it can become a major problem with foreground objects contrasting against mile-deep ocean).
Image 346

Thank you for an awesome tool!
I worked my way around this specific problem by creating the absorption effect in a post processing shader (a heavily modified version of the Global Fog Image Effect). I realize the only good way to distort the depth is to return a depth texture through Unity's "Graphics.blit" function.

Feel free to close this.