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
path: root/intern
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2018-04-16 20:26:54 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-04-16 20:38:58 +0300
commitdccda1fe434e3e3af47c44720cfedc9c1c4ccf52 (patch)
tree90754a8da2fce7307472f033c306452b7e9491a6 /intern
parent2b0b4133c8ced3dc569b787873883f44ec9c8979 (diff)
DRW/GWN: Add callId builtin uniform.
This uniforms can be used to have a unique id for each drawcall of a shgrp. This only works for standard shgroups and is an exception for the outline drawing.
Diffstat (limited to 'intern')
-rw-r--r--intern/gawain/gawain/gwn_shader_interface.h1
-rw-r--r--intern/gawain/src/gwn_shader_interface.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/intern/gawain/gawain/gwn_shader_interface.h b/intern/gawain/gawain/gwn_shader_interface.h
index 3be2831e539..150b3b4fcc0 100644
--- a/intern/gawain/gawain/gwn_shader_interface.h
+++ b/intern/gawain/gawain/gwn_shader_interface.h
@@ -36,6 +36,7 @@ typedef enum {
GWN_UNIFORM_COLOR, // vec4 color
GWN_UNIFORM_EYE, // vec3 eye
+ GWN_UNIFORM_CALLID, // int callId
GWN_UNIFORM_CUSTOM, // custom uniform, not one of the above built-ins
diff --git a/intern/gawain/src/gwn_shader_interface.c b/intern/gawain/src/gwn_shader_interface.c
index e92cabec12f..95c18cf1d39 100644
--- a/intern/gawain/src/gwn_shader_interface.c
+++ b/intern/gawain/src/gwn_shader_interface.c
@@ -48,6 +48,7 @@ static const char* BuiltinUniform_name(Gwn_UniformBuiltin u)
[GWN_UNIFORM_COLOR] = "color",
[GWN_UNIFORM_EYE] = "eye",
+ [GWN_UNIFORM_CALLID] = "callId",
[GWN_UNIFORM_CUSTOM] = NULL,
[GWN_NUM_UNIFORMS] = NULL,