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-02-01 20:21:29 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-02-01 21:05:22 +0300
commit9505af72d4be79cb0c1ce1678db2e392ba74804d (patch)
treea42d6a416566db3de9abcddeb9b17965fdf8abba /source/blender/gpu/opengl/gl_context.hh
parent9e42b9827aca935214d5cc60453b78acac53da17 (diff)
GPUShader: Add support for gpu_BaryCoord and fallback
This adds the possibility to use the `gpu_BaryCoord[NoPersp]` builtin to support barycentric coordinates without geometry shader. The `BuiltinBits::LAYER` builtin needs to be manually added to the `GPUShaderCreateInfo` in order to use this feature. Note: This is only available for shaders using `GPUShaderCreateInfo`. A geometry shader fallback is generated if the extension `AMD_shader_explicit_vertex_parameter` is not available. `NV_fragment_shader_barycentric` was not considered because it is not present inside the `glew.h` with use and seems to only be available with vulkan.
Diffstat (limited to 'source/blender/gpu/opengl/gl_context.hh')
-rw-r--r--source/blender/gpu/opengl/gl_context.hh1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/gpu/opengl/gl_context.hh b/source/blender/gpu/opengl/gl_context.hh
index 20a7417b358..b7a74863ac4 100644
--- a/source/blender/gpu/opengl/gl_context.hh
+++ b/source/blender/gpu/opengl/gl_context.hh
@@ -73,6 +73,7 @@ class GLContext : public Context {
static bool geometry_shader_invocations;
static bool fixed_restart_index_support;
static bool layered_rendering_support;
+ static bool native_barycentric_support;
static bool multi_bind_support;
static bool multi_draw_indirect_support;
static bool shader_draw_parameters_support;