diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-06-14 14:44:07 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-06-15 01:55:44 +0300 |
commit | 4873ff005b47908393fbc1e95b7fcfa4568d1072 (patch) | |
tree | cf3c829f9e6b4c849b1994287c51f22d55dba3d8 /source/blender/draw/engines/eevee/shaders/lightprobe_filter_diffuse_frag.glsl | |
parent | 49ba446f68954b7c32fbe40d733044cfbe39ff5d (diff) |
Eevee: Fix probe diffuse computation.
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 c08135aa979..0b97548c8df 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 @@ -187,9 +187,9 @@ void main() /* http://http.developer.nvidia.com/GPUGems3/gpugems3_ch20.html : Equation 13 */ float lod = clamp(lodFactor - 0.5 * log2(pdf * dist), 0.0, lodMax) ; - out_radiance += textureLod(probeHdr, L, lod).rgb * NL / pdf; + out_radiance += textureLod(probeHdr, L, lod).rgb * NL; + weight += NL; } - weight += 1.0; } FragColor = vec4(out_radiance / weight, 1.0); |