Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/eevee/shaders/effect_reflection_lib.glsl
| #pragma BLENDER_REQUIRE(common_view_lib.glsl) | #pragma BLENDER_REQUIRE(common_view_lib.glsl) | ||||
| /* Based on: | /* Based on: | ||||
| * "Stochastic Screen Space Reflections" | * "Stochastic Screen Space Reflections" | ||||
| * by Tomasz Stachowiak. | * by Tomasz Stachowiak. | ||||
| * https://www.ea.com/frostbite/news/stochastic-screen-space-reflections | * https://www.ea.com/frostbite/news/stochastic-screen-space-reflections | ||||
| * and | * and | ||||
| * "Stochastic all the things: raytracing in hybrid real-time rendering" | * "Stochastic all the things: raytracing in hybrid real-time rendering" | ||||
| * by Tomasz Stachowiak. | * by Tomasz Stachowiak. | ||||
| * https://media.contentapi.ea.com/content/dam/ea/seed/presentations/dd18-seed-raytracing-in-hybrid-real-time-rendering.pdf | * https://media.contentapi.ea.com/content/dam/ea/seed/presentations/dd18-seed-raytracing-in-hybrid-real-time-rendering.pdf | ||||
| */ | */ | ||||
| uniform ivec2 halfresOffset; | |||||
| struct HitData { | struct HitData { | ||||
| /** Hit direction scaled by intersection time. */ | /** Hit direction scaled by intersection time. */ | ||||
| vec3 hit_dir; | vec3 hit_dir; | ||||
| /** Screen space [0..1] depth of the reflection hit position, or -1.0 for planar reflections. */ | /** Screen space [0..1] depth of the reflection hit position, or -1.0 for planar reflections. */ | ||||
| float hit_depth; | float hit_depth; | ||||
| /** Inverse probability of ray spawning in this direction. */ | /** Inverse probability of ray spawning in this direction. */ | ||||
| float ray_pdf_inv; | float ray_pdf_inv; | ||||
| /** True if ray has hit valid geometry. */ | /** True if ray has hit valid geometry. */ | ||||
| ▲ Show 20 Lines • Show All 78 Lines • Show Last 20 Lines | |||||