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.
This commit is contained in:
parent
b9513706cb
commit
5c60721c9e
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue