[Bf-blender-cvs] [6825439b363] blender-v2.79-release: Fix T51805: Overlapping volumes renders incorrect on AMD GPU

Sergey Sharybin noreply at git.blender.org
Mon Sep 4 13:12:12 CEST 2017


Commit: 6825439b363bfe744b61e1ed6b79490adc38501e
Author: Sergey Sharybin
Date:   Wed Aug 23 12:32:48 2017 +0200
Branches: blender-v2.79-release
https://developer.blender.org/rB6825439b363bfe744b61e1ed6b79490adc38501e

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 2d810ff664f..470f7d0cfec 100644
--- a/intern/cycles/render/graph.cpp
+++ b/intern/cycles/render/graph.cpp
@@ -1040,6 +1040,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