[Bf-blender-cvs] [5c60721c9e3] master: Fix T51805: Overlapping volumes renders incorrect on AMD GPU

Sergey Sharybin noreply at git.blender.org
Wed Aug 23 12:35:29 CEST 2017


Commit: 5c60721c9e3d5af2bd4f80b3013fe0c804cf7531
Author: Sergey Sharybin
Date:   Wed Aug 23 12:32:48 2017 +0200
Branches: master
https://developer.blender.org/rB5c60721c9e3d5af2bd4f80b3013fe0c804cf7531

Fix T51805: Overlapping volumes renders incorrect on AMD GPU

We need to make sure we can store all volume closures for all objects in volume
stack. This is a bit tricky to detect what would be the "nestness" level of
volumes so for now use maximum possible stack depth. Might cause some slowdown,
but better to give reliable render output than to fail quickly.

Should be safe for 2.79 after extra eyes.

===================================================================

M	intern/cycles/render/graph.cpp

===================================================================

diff --git a/intern/cycles/render/graph.cpp b/intern/cycles/render/graph.cpp
index 41e7e0205b0..08203163d1a 100644
--- a/intern/cycles/render/graph.cpp
+++ b/intern/cycles/render/graph.cpp
@@ -1018,6 +1018,9 @@ int ShaderGraph::get_num_closures()
 		else if(CLOSURE_IS_PRINCIPLED(closure_type)) {
 			num_closures += 8;
 		}
+		else if(CLOSURE_IS_VOLUME(closure_type)) {
+			num_closures += VOLUME_STACK_SIZE;
+		}
 		else {
 			++num_closures;
 		}



More information about the Bf-blender-cvs mailing list