Fix: GPU compositor always returns first view

The experimental GPU compositor always returned the first view in
multi-view rendering. This patch fixes that by also checking for the
view name of the context when searching for the appropriate pass.
This commit is contained in:
Omar Emara
2023-10-05 13:51:56 +03:00
parent 355f457cd4
commit 8860dc9910
+1 -2
View File
@@ -231,8 +231,7 @@ class Context : public realtime_compositor::Context {
if (view_layer) {
RenderLayer *rl = RE_GetRenderLayer(rr, view_layer->name);
if (rl) {
RenderPass *rpass = (RenderPass *)BLI_findstring(
&rl->passes, pass_name, offsetof(RenderPass, name));
RenderPass *rpass = RE_pass_find_by_name(rl, pass_name, get_view_name().data());
if (rpass && rpass->ibuf && rpass->ibuf->float_buffer.data) {
input_texture = RE_pass_ensure_gpu_texture_cache(re, rpass);