diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2021-03-12 16:31:39 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2021-03-13 22:59:20 +0300 |
commit | 5fee9dae5d772819f261be420b5128e0e2a561f9 (patch) | |
tree | 52cc8095af29229f01ae97bb5ac8c49641a5c374 /source/blender/draw/engines/eevee/shaders/lightprobe_filter_diffuse_frag.glsl | |
parent | ba3a0dc9ba91e2f55e3632a69f8671079d871a94 (diff) |
Cleanup: EEVEE: Make bsdf_sampling_lib.glsl more tidy
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 | 4 |
1 files changed, 2 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 0d0ae6ea4a5..18fcfd4fd41 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 @@ -147,14 +147,14 @@ void main() float weight = 0.0; vec3 out_radiance = vec3(0.0); for (float i = 0; i < sampleCount; i++) { - vec3 L = sample_hemisphere(i, invSampleCount, N, T, B); /* Microfacet normal */ + float pdf; + vec3 L = sample_hemisphere(i, invSampleCount, N, T, B, pdf); float NL = dot(N, L); if (NL > 0.0) { /* Coarse Approximation of the mapping distortion * Unit Sphere -> Cubemap Face */ const float dist = 4.0 * M_PI / 6.0; - float pdf = pdf_hemisphere(); /* http://http.developer.nvidia.com/GPUGems3/gpugems3_ch20.html : Equation 13 */ float lod = clamp(lodFactor - 0.5 * log2(pdf * dist), 0.0, lodMax); |