diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2021-03-12 17:59:38 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2021-03-13 22:59:20 +0300 |
commit | 6a7f6f2867dc8a7aba8e91bf0fdf299ef276a65b (patch) | |
tree | 738770ecdbb2adc0ccb95be64d0db54f1637e976 /source/blender/draw/engines/eevee/shaders/lightprobe_filter_diffuse_frag.glsl | |
parent | 5fee9dae5d772819f261be420b5128e0e2a561f9 (diff) |
Cleanup: EEVEE: Remove hammersley texture and split hammersley code
Diffstat (limited to 'source/blender/draw/engines/eevee/shaders/lightprobe_filter_diffuse_frag.glsl')
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/lightprobe_filter_diffuse_frag.glsl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/lightprobe_filter_diffuse_frag.glsl b/source/blender/draw/engines/eevee/shaders/lightprobe_filter_diffuse_frag.glsl index 18fcfd4fd41..9ecc50d9df5 100644 --- a/source/blender/draw/engines/eevee/shaders/lightprobe_filter_diffuse_frag.glsl +++ b/source/blender/draw/engines/eevee/shaders/lightprobe_filter_diffuse_frag.glsl @@ -1,4 +1,5 @@ +#pragma BLENDER_REQUIRE(random_lib.glsl) #pragma BLENDER_REQUIRE(bsdf_sampling_lib.glsl) #pragma BLENDER_REQUIRE(common_math_geom_lib.glsl) #pragma BLENDER_REQUIRE(irradiance_lib.glsl) @@ -10,7 +11,6 @@ uniform float lodMax; uniform float intensityFac; uniform float sampleCount; -uniform float invSampleCount; in vec3 worldPosition; @@ -147,8 +147,10 @@ void main() float weight = 0.0; vec3 out_radiance = vec3(0.0); for (float i = 0; i < sampleCount; i++) { + vec3 Xi = rand2d_to_cylinder(hammersley_2d(i, sampleCount)); + float pdf; - vec3 L = sample_hemisphere(i, invSampleCount, N, T, B, pdf); + vec3 L = sample_uniform_hemisphere(Xi, N, T, B, pdf); float NL = dot(N, L); if (NL > 0.0) { |