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:
authorLukas Stockner <lukas.stockner@freenet.de>2016-06-21 21:02:21 +0300
committerLukas Stockner <lukas.stockner@freenet.de>2016-06-21 21:09:48 +0300
commit028ba319038c6d6fb391df38874af68dae6c4eb5 (patch)
tree6d00af914d74f05fec1cfbd2697506f112f9eb0b /intern/cycles
parentdb4a46bc3c97bf9762a472bb8dcd4213b69acf83 (diff)
Fix T48698: Rays from SSS act as diffuse for normal objects but have an undefined type for lamp objects
The problem here was that there are five path types internally (diffuse, glossy, transmission, subsurface and volume scatter), but subsurface isn't exposed to the user. This caused some weird behaviour - if all four types are disabled on the lamp, Cycles doesn't even try sampling it, but if any type was active, the lamp would illuminate the cube since none of the options set subsurface to zero. In the future, it might be reasonable to add subsurface visibility as an option - but for now the weird and inconsistent behaviour can be fixed simply by setting both diffuse and subsurface to zero if the user disables diffuse visibility.
Diffstat (limited to 'intern/cycles')
-rw-r--r--intern/cycles/kernel/kernel_emission.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/intern/cycles/kernel/kernel_emission.h b/intern/cycles/kernel/kernel_emission.h
index 4de8e0f698a..e22bcead404 100644
--- a/intern/cycles/kernel/kernel_emission.h
+++ b/intern/cycles/kernel/kernel_emission.h
@@ -124,8 +124,10 @@ ccl_device_noinline bool direct_emission(KernelGlobals *kg,
#ifdef __PASSES__
/* use visibility flag to skip lights */
if(ls->shader & SHADER_EXCLUDE_ANY) {
- if(ls->shader & SHADER_EXCLUDE_DIFFUSE)
+ if(ls->shader & SHADER_EXCLUDE_DIFFUSE) {
eval->diffuse = make_float3(0.0f, 0.0f, 0.0f);
+ eval->subsurface = make_float3(0.0f, 0.0f, 0.0f);
+ }
if(ls->shader & SHADER_EXCLUDE_GLOSSY)
eval->glossy = make_float3(0.0f, 0.0f, 0.0f);
if(ls->shader & SHADER_EXCLUDE_TRANSMIT)