Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2017-11-14 01:25:46 +0300
committerClément Foucault <foucault.clem@gmail.com>2017-11-14 01:25:46 +0300
commit93936b8643b9c4f77fe13d35b41ecaa246843dd8 (patch)
tree3c7738ec519551a344e4b395bb56e806a76f6fa7 /source/blender/gpu/intern/gpu_viewport.c
parentab013224adf5bb07c1467637592cd8c7bb5cb2fe (diff)
GPUTexture: Add for stencil to default depth buffers.
Theses will be used by eevee SSS. TODO: only allocate stencil if needed.
Diffstat (limited to 'source/blender/gpu/intern/gpu_viewport.c')
-rw-r--r--source/blender/gpu/intern/gpu_viewport.c5
1 files changed, 3 insertions, 2 deletions
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 */