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:
authorMike Erwin <significant.bit@gmail.com>2017-03-27 04:19:23 +0300
committerMike Erwin <significant.bit@gmail.com>2017-03-27 04:23:55 +0300
commit4c08c5b192415190ab8b11637d8dc4f2a66c2ddf (patch)
tree48f691c9bbdf1c1c53841f0d5ec402d124fefd13 /source/blender/gpu/shaders/gpu_shader_geometry.glsl
parent2a7e4c3040f259973a5209d0520bdb5d55e52f2d (diff)
OpenGL: use new matrix names in GLSL
Builtin names staring with gl_ will not be available in core profile. Same with the ftransform function. New matrix API provides the same names minus the gl_ prefix. Part of T49450
Diffstat (limited to 'source/blender/gpu/shaders/gpu_shader_geometry.glsl')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_geometry.glsl7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_geometry.glsl b/source/blender/gpu/shaders/gpu_shader_geometry.glsl
index fe630dbeddb..545910d39ca 100644
--- a/source/blender/gpu/shaders/gpu_shader_geometry.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_geometry.glsl
@@ -1,3 +1,6 @@
+
+uniform mat4 ProjectionMatrix;
+
uniform int PrimitiveIdBase;
uniform int osd_active_uv_offset;
@@ -69,7 +72,7 @@ void emit_flat(int index, vec3 normal)
set_mtface_vertex_attrs(st);
- gl_Position = gl_ProjectionMatrix * inpt[index].v.position;
+ gl_Position = ProjectionMatrix * inpt[index].v.position;
EmitVertex();
}
@@ -90,7 +93,7 @@ void emit_smooth(int index)
set_mtface_vertex_attrs(st);
- gl_Position = gl_ProjectionMatrix * inpt[index].v.position;
+ gl_Position = ProjectionMatrix * inpt[index].v.position;
EmitVertex();
}