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
f2aa9bec9d
commit
6825439b36
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue