diff --git a/source/blender/gpu/intern/gpu_framebuffer.cc b/source/blender/gpu/intern/gpu_framebuffer.cc index 8ef6ee21723..54c9e65f753 100644 --- a/source/blender/gpu/intern/gpu_framebuffer.cc +++ b/source/blender/gpu/intern/gpu_framebuffer.cc @@ -686,8 +686,10 @@ GPUOffScreen *GPU_offscreen_create(int width, ofs->color = GPU_texture_create_2d("ofs_color", width, height, 1, format, usage, nullptr); if (depth) { + /* Format view flag is needed by Workbench Volumes to read the stencil view. */ + eGPUTextureUsage depth_usage = usage | GPU_TEXTURE_USAGE_FORMAT_VIEW; ofs->depth = GPU_texture_create_2d( - "ofs_depth", width, height, 1, GPU_DEPTH24_STENCIL8, usage, nullptr); + "ofs_depth", width, height, 1, GPU_DEPTH24_STENCIL8, depth_usage, nullptr); } if ((depth && !ofs->depth) || !ofs->color) {