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-30 16:12:11 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-03-30 16:13:25 +0300
commitfb524d1675cf74e4d9e11e6b070f2158dfd0a57a (patch)
treec07cccdddd2be777e2051ed5dab4b2d4e913469b /source/blender/gpu/intern/gpu_shader_create_info.cc
parent5aa81594e6d931de01cb67399373eddae2fc7622 (diff)
GPUShaderCreateInfo: Add DepthWrite option
This option lets specify explicitely how the fragment shader will change the fragment's depth.
Diffstat (limited to 'source/blender/gpu/intern/gpu_shader_create_info.cc')
-rw-r--r--source/blender/gpu/intern/gpu_shader_create_info.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_shader_create_info.cc b/source/blender/gpu/intern/gpu_shader_create_info.cc
index 350575e9d36..0dd82d4ea44 100644
--- a/source/blender/gpu/intern/gpu_shader_create_info.cc
+++ b/source/blender/gpu/intern/gpu_shader_create_info.cc
@@ -65,6 +65,9 @@ void ShaderCreateInfo::finalize()
if (info.early_fragment_test_) {
early_fragment_test_ = true;
}
+ if (info.depth_write_ != DepthWrite::ANY) {
+ depth_write_ = info.depth_write_;
+ }
validate(info);