Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2021-04-15 17:21:37 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-04-19 22:07:40 +0300
commitd1fbf1599fd445955596b69e327d30710e50724e (patch)
tree27a36f59a03ea68e917a617a88c37e94c27ffb39 /intern/cycles/render/shader.cpp
parentb42454be8bf08381a4c3578e6a4bdfaec0471586 (diff)
Cycles: include more transparency and emission in fast GI approximation
For indirect light rays, don't assume any hit is opaque, rather if it has transparency or emission do the shading but don't do any further bounces. Naturally this is slower when there are transparent surfaces, however without this cutout opacity doesn't give sensible results. Differential Revision: https://developer.blender.org/D10985
Diffstat (limited to 'intern/cycles/render/shader.cpp')
-rw-r--r--intern/cycles/render/shader.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/intern/cycles/render/shader.cpp b/intern/cycles/render/shader.cpp
index 5ecbd92d96d..44a48cd2839 100644
--- a/intern/cycles/render/shader.cpp
+++ b/intern/cycles/render/shader.cpp
@@ -528,6 +528,8 @@ void ShaderManager::device_update_common(Device *device,
if (shader->get_use_mis())
flag |= SD_USE_MIS;
+ if (shader->has_surface_emission)
+ flag |= SD_HAS_EMISSION;
if (shader->has_surface_transparent && shader->get_use_transparent_shadow())
flag |= SD_HAS_TRANSPARENT_SHADOW;
if (shader->has_volume) {