[Bf-blender-cvs] [31c1773e891] soc-2022-many-lights-sampling: Tweak intensity heuristic to use max instead of average, suggested by Alaska
Brecht Van Lommel
noreply at git.blender.org
Sat Nov 19 19:21:40 CET 2022
Commit: 31c1773e891e48223655bb53604e071423743fb7
Author: Brecht Van Lommel
Date: Sat Nov 19 18:44:13 2022 +0100
Branches: soc-2022-many-lights-sampling
https://developer.blender.org/rB31c1773e891e48223655bb53604e071423743fb7
Tweak intensity heuristic to use max instead of average, suggested by Alaska
Ref D16554
===================================================================
M intern/cycles/scene/shader.cpp
===================================================================
diff --git a/intern/cycles/scene/shader.cpp b/intern/cycles/scene/shader.cpp
index 463fc85d195..226e20d8753 100644
--- a/intern/cycles/scene/shader.cpp
+++ b/intern/cycles/scene/shader.cpp
@@ -350,8 +350,8 @@ void Shader::estimate_emission()
* using a lot of memory in the light tree and potentially wasting samples
* where indirect light samples are sufficient.
* Possible optimization: estimate front and back emission separately. */
- emission_sampling = (average(emission_estimate) > 0.5f) ? EMISSION_SAMPLING_FRONT_BACK :
- EMISSION_SAMPLING_NONE;
+ emission_sampling = (reduce_max(emission_estimate) > 0.5f) ? EMISSION_SAMPLING_FRONT_BACK :
+ EMISSION_SAMPLING_NONE;
}
else {
emission_sampling = emission_sampling_method;
More information about the Bf-blender-cvs
mailing list