diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-11-14 01:25:46 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-11-14 01:25:46 +0300 |
commit | 93936b8643b9c4f77fe13d35b41ecaa246843dd8 (patch) | |
tree | 3c7738ec519551a344e4b395bb56e806a76f6fa7 /source/blender/gpu/intern/gpu_texture.c | |
parent | ab013224adf5bb07c1467637592cd8c7bb5cb2fe (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_texture.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_texture.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_texture.c b/source/blender/gpu/intern/gpu_texture.c index ac8c8bacac1..252eede8758 100644 --- a/source/blender/gpu/intern/gpu_texture.c +++ b/source/blender/gpu/intern/gpu_texture.c @@ -711,6 +711,11 @@ GPUTexture *GPU_texture_create_depth_multisample(int w, int h, int samples, char return GPU_texture_create_nD(w, h, 0, 2, NULL, GPU_DEPTH_COMPONENT24, 1, samples, false, err_out); } +GPUTexture *GPU_texture_create_depth_with_stencil_multisample(int w, int h, int samples, char err_out[256]) +{ + return GPU_texture_create_nD(w, h, 0, 2, NULL, GPU_DEPTH24_STENCIL8, 1, samples, false, err_out); +} + void GPU_texture_update(GPUTexture *tex, const float *pixels) { BLI_assert(tex->format > -1); |