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>2022-03-16 10:36:42 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-03-18 22:54:42 +0300
commit93bf17d9521025fe849bf705773de7bacc1dc01d (patch)
treeb453ac58905391133b423902fbdde609ec81ab14 /source/blender/gpu/GPU_texture.h
parent054957659f671910e1967fec83768affbbff060c (diff)
GPU: Add support for stencil buffer texturing mode.
This adds the possibility to read the stencil buffer inside shaders. This is only available on GL 4.3 so use it accordingly.
Diffstat (limited to 'source/blender/gpu/GPU_texture.h')
-rw-r--r--source/blender/gpu/GPU_texture.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_texture.h b/source/blender/gpu/GPU_texture.h
index 0c7f1c1cbd4..4dbcd84672c 100644
--- a/source/blender/gpu/GPU_texture.h
+++ b/source/blender/gpu/GPU_texture.h
@@ -299,6 +299,11 @@ void GPU_texture_filter_mode(GPUTexture *tex, bool use_filter);
void GPU_texture_mipmap_mode(GPUTexture *tex, bool use_mipmap, bool use_filter);
void GPU_texture_wrap_mode(GPUTexture *tex, bool use_repeat, bool use_clamp);
void GPU_texture_swizzle_set(GPUTexture *tex, const char swizzle[4]);
+/**
+ * Set depth stencil texture sampling behavior. Can work on texture views.
+ * If stencil sampling is enabled, an unsigned integer sampler is required.
+ */
+void GPU_texture_stencil_texture_mode_set(GPUTexture *tex, bool use_stencil);
/**
* Return the number of dimensions of the texture ignoring dimension of layers (1, 2 or 3).