[Bf-blender-cvs] [aacc218f1fa] soc-2022-many-lights-sampling: Fix broken IES textures after recent shader estimate optimization
Brecht Van Lommel
noreply at git.blender.org
Sun Nov 20 17:18:36 CET 2022
Commit: aacc218f1fa5abe28c065c000d28ce994b635547
Author: Brecht Van Lommel
Date: Sun Nov 20 17:14:30 2022 +0100
Branches: soc-2022-many-lights-sampling
https://developer.blender.org/rBaacc218f1fa5abe28c065c000d28ce994b635547
Fix broken IES textures after recent shader estimate optimization
===================================================================
M intern/cycles/scene/shader.cpp
===================================================================
diff --git a/intern/cycles/scene/shader.cpp b/intern/cycles/scene/shader.cpp
index 226e20d8753..4364f447509 100644
--- a/intern/cycles/scene/shader.cpp
+++ b/intern/cycles/scene/shader.cpp
@@ -310,12 +310,16 @@ static float3 output_estimate_emission(ShaderOutput *output, bool &is_constant)
/* Other nodes, potentially OSL nodes with arbitrary code for which all we can
* determine is if it has emission or not. */
const bool has_emission = node->has_surface_emission();
- float3 estimate = (has_emission) ? one_float3() : zero_float3();
+ float3 estimate;
if (output->type() == SocketType::CLOSURE) {
if (has_emission) {
+ estimate = one_float3();
is_constant = false;
}
+ else {
+ estimate = zero_float3();
+ }
foreach (const ShaderInput *in, node->inputs) {
if (in->type() == SocketType::CLOSURE && in->link) {
@@ -323,6 +327,9 @@ static float3 output_estimate_emission(ShaderOutput *output, bool &is_constant)
}
}
}
+ else {
+ estimate = one_float3();
+ }
return estimate;
}
More information about the Bf-blender-cvs
mailing list