[Bf-blender-cvs] [e138f629b72] soc-2022-many-lights-sampling: Fix worse mesh light test results after previous change
Brecht Van Lommel
noreply at git.blender.org
Fri Nov 18 20:28:07 CET 2022
Commit: e138f629b72f12968f6c676945608a816d4f864d
Author: Brecht Van Lommel
Date: Fri Nov 18 20:19:33 2022 +0100
Branches: soc-2022-many-lights-sampling
https://developer.blender.org/rBe138f629b72f12968f6c676945608a816d4f864d
Fix worse mesh light test results after previous change
Make auto emission sampling heuristic more conservative, though it's
still rather arbitrary. And fix accidental wrong data type.
===================================================================
M intern/cycles/scene/shader.cpp
M intern/cycles/scene/shader.h
===================================================================
diff --git a/intern/cycles/scene/shader.cpp b/intern/cycles/scene/shader.cpp
index b26fb99ef39..463fc85d195 100644
--- a/intern/cycles/scene/shader.cpp
+++ b/intern/cycles/scene/shader.cpp
@@ -350,7 +350,7 @@ 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) > 2.0f) ? EMISSION_SAMPLING_FRONT_BACK :
+ emission_sampling = (average(emission_estimate) > 0.5f) ? EMISSION_SAMPLING_FRONT_BACK :
EMISSION_SAMPLING_NONE;
}
else {
diff --git a/intern/cycles/scene/shader.h b/intern/cycles/scene/shader.h
index aad55daafc8..e1fa4585bdf 100644
--- a/intern/cycles/scene/shader.h
+++ b/intern/cycles/scene/shader.h
@@ -124,7 +124,7 @@ class Shader : public Node {
bool has_integrator_dependency;
float3 emission_estimate;
- bool emission_sampling;
+ EmissionSampling emission_sampling;
bool emission_is_constant;
/* requested mesh attributes */
More information about the Bf-blender-cvs
mailing list