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:
authorMike Erwin <significant.bit@gmail.com>2017-04-16 00:07:29 +0300
committerMike Erwin <significant.bit@gmail.com>2017-04-16 00:07:29 +0300
commit2593ce9c3327db99cfcf665c0a4d315b13c356f3 (patch)
tree235398fba4061e2037c03a0904c0042ce9e26285 /intern
parentea105bab2b8f5a60afba51e54d65bad8b4cc9afa (diff)
Gawain: remove 2D matrix uniforms from ShaderInterface
- remove 2D-specific variants of BuiltinUniform enum - rename remaining builtins to exclude "_3D" since they can be used by 2D or 3D shaders Follow up to D2626
Diffstat (limited to 'intern')
-rw-r--r--intern/gawain/gawain/shader_interface.h16
-rw-r--r--intern/gawain/src/shader_interface.c16
2 files changed, 12 insertions, 20 deletions
diff --git a/intern/gawain/gawain/shader_interface.h b/intern/gawain/gawain/shader_interface.h
index 9864759015f..effa4aca90f 100644
--- a/intern/gawain/gawain/shader_interface.h
+++ b/intern/gawain/gawain/shader_interface.h
@@ -16,17 +16,13 @@
typedef enum {
UNIFORM_NONE, // uninitialized/unknown
- UNIFORM_MODELVIEW_3D, // mat4 ModelViewMatrix
- UNIFORM_PROJECTION_3D, // mat4 ProjectionMatrix
- UNIFORM_MVP_3D, // mat4 ModelViewProjectionMatrix
- UNIFORM_NORMAL_3D, // mat3 NormalMatrix
+ UNIFORM_MODELVIEW, // mat4 ModelViewMatrix
+ UNIFORM_PROJECTION, // mat4 ProjectionMatrix
+ UNIFORM_MVP, // mat4 ModelViewProjectionMatrix
+ UNIFORM_NORMAL, // mat3 NormalMatrix
- UNIFORM_MODELVIEW_INV_3D, // mat4 ModelViewInverseMatrix
- UNIFORM_PROJECTION_INV_3D, // mat4 ProjectionInverseMatrix
-
- UNIFORM_MODELVIEW_2D, // mat3 ModelViewMatrix
- UNIFORM_PROJECTION_2D, // mat3 ProjectionMatrix
- UNIFORM_MVP_2D, // mat3 ModelViewProjectionMatrix
+ UNIFORM_MODELVIEW_INV, // mat4 ModelViewInverseMatrix
+ UNIFORM_PROJECTION_INV, // mat4 ProjectionInverseMatrix
UNIFORM_COLOR, // vec4 color
diff --git a/intern/gawain/src/shader_interface.c b/intern/gawain/src/shader_interface.c
index d3c9ad0240c..d1f6031c480 100644
--- a/intern/gawain/src/shader_interface.c
+++ b/intern/gawain/src/shader_interface.c
@@ -27,17 +27,13 @@ static const char* BuiltinUniform_name(BuiltinUniform u)
{
[UNIFORM_NONE] = NULL,
- [UNIFORM_MODELVIEW_3D] = "ModelViewMatrix",
- [UNIFORM_PROJECTION_3D] = "ProjectionMatrix",
- [UNIFORM_MVP_3D] = "ModelViewProjectionMatrix",
- [UNIFORM_NORMAL_3D] = "NormalMatrix",
+ [UNIFORM_MODELVIEW] = "ModelViewMatrix",
+ [UNIFORM_PROJECTION] = "ProjectionMatrix",
+ [UNIFORM_MVP] = "ModelViewProjectionMatrix",
+ [UNIFORM_NORMAL] = "NormalMatrix",
- [UNIFORM_MODELVIEW_INV_3D] = "ModelViewInverseMatrix",
- [UNIFORM_PROJECTION_INV_3D] = "ProjectionInverseMatrix",
-
- [UNIFORM_MODELVIEW_2D] = "ModelViewMatrix",
- [UNIFORM_PROJECTION_2D] = "ProjectionMatrix",
- [UNIFORM_MVP_2D] = "ModelViewProjectionMatrix",
+ [UNIFORM_MODELVIEW_INV] = "ModelViewInverseMatrix",
+ [UNIFORM_PROJECTION_INV] = "ProjectionInverseMatrix",
[UNIFORM_COLOR] = "color",