From 93936b8643b9c4f77fe13d35b41ecaa246843dd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Mon, 13 Nov 2017 23:25:46 +0100 Subject: GPUTexture: Add for stencil to default depth buffers. Theses will be used by eevee SSS. TODO: only allocate stencil if needed. --- source/blender/gpu/intern/gpu_viewport.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/gpu/intern/gpu_viewport.c') diff --git a/source/blender/gpu/intern/gpu_viewport.c b/source/blender/gpu/intern/gpu_viewport.c index bdbf829a1ca..bd563a36f57 100644 --- a/source/blender/gpu/intern/gpu_viewport.c +++ b/source/blender/gpu/intern/gpu_viewport.c @@ -381,7 +381,8 @@ void GPU_viewport_bind(GPUViewport *viewport, const rcti *rect) } /* Depth */ - dtxl->multisample_depth = GPU_texture_create_depth_multisample(rect_w, rect_h, U.ogl_multisamples, NULL); + dtxl->multisample_depth = GPU_texture_create_depth_with_stencil_multisample(rect_w, rect_h, + U.ogl_multisamples, NULL); if (!dtxl->multisample_depth) { ok = false; @@ -430,7 +431,7 @@ cleanup_multisample: } /* Depth */ - dtxl->depth = GPU_texture_create_depth(rect_w, rect_h, NULL); + dtxl->depth = GPU_texture_create_depth_with_stencil(rect_w, rect_h, NULL); if (dtxl->depth) { /* Define texture parameters */ -- cgit v1.2.3