diff options
Diffstat (limited to 'source/blender/gpu/shaders')
13 files changed, 38 insertions, 13 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_2D_flat_color_vert.glsl b/source/blender/gpu/shaders/gpu_shader_2D_flat_color_vert.glsl index aa1eba470ab..96c833f3b93 100644 --- a/source/blender/gpu/shaders/gpu_shader_2D_flat_color_vert.glsl +++ b/source/blender/gpu/shaders/gpu_shader_2D_flat_color_vert.glsl @@ -1,4 +1,6 @@ +uniform mat4 ModelViewProjectionMatrix; + #if __VERSION__ == 120 attribute vec2 pos; attribute vec4 color; @@ -13,6 +15,6 @@ void main() { - gl_Position = gl_ModelViewProjectionMatrix * vec4(pos, 0.0, 1.0); + gl_Position = ModelViewProjectionMatrix * vec4(pos, 0.0, 1.0); finalColor = color; } diff --git a/source/blender/gpu/shaders/gpu_shader_2D_no_color_vert.glsl b/source/blender/gpu/shaders/gpu_shader_2D_no_color_vert.glsl index 7ad30052cf5..4049171f73d 100644 --- a/source/blender/gpu/shaders/gpu_shader_2D_no_color_vert.glsl +++ b/source/blender/gpu/shaders/gpu_shader_2D_no_color_vert.glsl @@ -1,4 +1,6 @@ +uniform mat4 ModelViewProjectionMatrix; + #if __VERSION__ == 120 attribute vec2 pos; #else @@ -7,5 +9,5 @@ void main() { - gl_Position = gl_ModelViewProjectionMatrix * vec4(pos, 0.0, 1.0); + gl_Position = ModelViewProjectionMatrix * vec4(pos, 0.0, 1.0); } diff --git a/source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_uniform_color_outline_smooth_vert.glsl b/source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_uniform_color_outline_smooth_vert.glsl index cff493bcfc7..a37ae16f837 100644 --- a/source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_uniform_color_outline_smooth_vert.glsl +++ b/source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_uniform_color_outline_smooth_vert.glsl @@ -1,4 +1,5 @@ +uniform mat4 ModelViewProjectionMatrix; uniform float size; uniform float outlineWidth; @@ -11,7 +12,7 @@ uniform float outlineWidth; #endif void main() { - gl_Position = gl_ModelViewProjectionMatrix * vec4(pos, 0.0, 1.0); + gl_Position = ModelViewProjectionMatrix * vec4(pos, 0.0, 1.0); gl_PointSize = size; // calculate concentric radii in pixels diff --git a/source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_uniform_color_smooth_vert.glsl b/source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_uniform_color_smooth_vert.glsl index f72c4c5a9e7..201e5e90ecc 100644 --- a/source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_uniform_color_smooth_vert.glsl +++ b/source/blender/gpu/shaders/gpu_shader_2D_point_uniform_size_uniform_color_smooth_vert.glsl @@ -1,4 +1,5 @@ +uniform mat4 ModelViewProjectionMatrix; uniform float size; #if __VERSION__ == 120 @@ -10,7 +11,7 @@ uniform float size; #endif void main() { - gl_Position = gl_ModelViewProjectionMatrix * vec4(pos, 0.0, 1.0); + gl_Position = ModelViewProjectionMatrix * vec4(pos, 0.0, 1.0); gl_PointSize = size; // calculate concentric radii in pixels diff --git a/source/blender/gpu/shaders/gpu_shader_2D_point_varying_size_varying_color_vert.glsl b/source/blender/gpu/shaders/gpu_shader_2D_point_varying_size_varying_color_vert.glsl index 4cdd43a0a97..42ff51e3d03 100644 --- a/source/blender/gpu/shaders/gpu_shader_2D_point_varying_size_varying_color_vert.glsl +++ b/source/blender/gpu/shaders/gpu_shader_2D_point_varying_size_varying_color_vert.glsl @@ -1,4 +1,6 @@ +uniform mat4 ModelViewProjectionMatrix; + #if __VERSION__ == 120 attribute vec2 pos; attribute float size; @@ -13,7 +15,7 @@ void main() { - gl_Position = gl_ModelViewProjectionMatrix * vec4(pos, 0.0, 1.0); + gl_Position = ModelViewProjectionMatrix * vec4(pos, 0.0, 1.0); gl_PointSize = size; finalColor = color; } diff --git a/source/blender/gpu/shaders/gpu_shader_2D_smooth_color_vert.glsl b/source/blender/gpu/shaders/gpu_shader_2D_smooth_color_vert.glsl index 01606622c78..9daf2d75016 100644 --- a/source/blender/gpu/shaders/gpu_shader_2D_smooth_color_vert.glsl +++ b/source/blender/gpu/shaders/gpu_shader_2D_smooth_color_vert.glsl @@ -1,4 +1,6 @@ +uniform mat4 ModelViewProjectionMatrix; + #if __VERSION__ == 120 attribute vec2 pos; attribute vec4 color; @@ -13,6 +15,6 @@ void main() { - gl_Position = gl_ModelViewProjectionMatrix * vec4(pos, 0.0, 1.0); + gl_Position = ModelViewProjectionMatrix * vec4(pos, 0.0, 1.0); finalColor = color; } diff --git a/source/blender/gpu/shaders/gpu_shader_2D_texture_vert.glsl b/source/blender/gpu/shaders/gpu_shader_2D_texture_vert.glsl index d4d36def8cd..4c05cf1d25b 100644 --- a/source/blender/gpu/shaders/gpu_shader_2D_texture_vert.glsl +++ b/source/blender/gpu/shaders/gpu_shader_2D_texture_vert.glsl @@ -1,3 +1,6 @@ + +uniform mat4 ModelViewProjectionMatrix; + #if __VERSION__ == 120 attribute vec2 texcoord; attribute vec3 position; @@ -11,6 +14,6 @@ void main() { - gl_Position = gl_ModelViewProjectionMatrix * vec4(position.xyz, 1.0f); + gl_Position = ModelViewProjectionMatrix * vec4(position.xyz, 1.0f); texture_coord = texcoord; } diff --git a/source/blender/gpu/shaders/gpu_shader_3D_flat_color_vert.glsl b/source/blender/gpu/shaders/gpu_shader_3D_flat_color_vert.glsl index ec6037e5077..8c241cff5d4 100644 --- a/source/blender/gpu/shaders/gpu_shader_3D_flat_color_vert.glsl +++ b/source/blender/gpu/shaders/gpu_shader_3D_flat_color_vert.glsl @@ -1,4 +1,6 @@ +uniform mat4 ModelViewProjectionMatrix; + #if __VERSION__ == 120 attribute vec3 pos; attribute vec4 color; @@ -13,6 +15,6 @@ void main() { - gl_Position = gl_ModelViewProjectionMatrix * vec4(pos, 1.0); + gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0); finalColor = color; } diff --git a/source/blender/gpu/shaders/gpu_shader_3D_no_color_vert.glsl b/source/blender/gpu/shaders/gpu_shader_3D_no_color_vert.glsl index 5d10eaec6d8..32da3a99c63 100644 --- a/source/blender/gpu/shaders/gpu_shader_3D_no_color_vert.glsl +++ b/source/blender/gpu/shaders/gpu_shader_3D_no_color_vert.glsl @@ -1,4 +1,6 @@ +uniform mat4 ModelViewProjectionMatrix; + #if __VERSION__ == 120 attribute vec3 pos; #else @@ -7,5 +9,5 @@ void main() { - gl_Position = gl_ModelViewProjectionMatrix * vec4(pos, 1.0); + gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0); } diff --git a/source/blender/gpu/shaders/gpu_shader_3D_point_fixed_size_varying_color_vert.glsl b/source/blender/gpu/shaders/gpu_shader_3D_point_fixed_size_varying_color_vert.glsl index 451d8620596..84e77e59e90 100644 --- a/source/blender/gpu/shaders/gpu_shader_3D_point_fixed_size_varying_color_vert.glsl +++ b/source/blender/gpu/shaders/gpu_shader_3D_point_fixed_size_varying_color_vert.glsl @@ -1,4 +1,6 @@ +uniform mat4 ModelViewProjectionMatrix; + #if __VERSION__ == 120 attribute vec3 pos; attribute vec4 color; @@ -11,6 +13,6 @@ void main() { - gl_Position = gl_ModelViewProjectionMatrix * vec4(pos, 1.0); + gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0); finalColor = color; } diff --git a/source/blender/gpu/shaders/gpu_shader_3D_point_varying_size_no_color_vert.glsl b/source/blender/gpu/shaders/gpu_shader_3D_point_varying_size_no_color_vert.glsl index 0bdcbd5fef3..1fcda765b99 100644 --- a/source/blender/gpu/shaders/gpu_shader_3D_point_varying_size_no_color_vert.glsl +++ b/source/blender/gpu/shaders/gpu_shader_3D_point_varying_size_no_color_vert.glsl @@ -1,4 +1,6 @@ +uniform mat4 ModelViewProjectionMatrix; + #if __VERSION__ == 120 attribute vec3 pos; attribute float size; @@ -9,6 +11,6 @@ void main() { - gl_Position = gl_ModelViewProjectionMatrix * vec4(pos, 1.0); + gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0); gl_PointSize = size; } diff --git a/source/blender/gpu/shaders/gpu_shader_3D_point_varying_size_varying_color_vert.glsl b/source/blender/gpu/shaders/gpu_shader_3D_point_varying_size_varying_color_vert.glsl index 529b46d3e2b..7999435f0e4 100644 --- a/source/blender/gpu/shaders/gpu_shader_3D_point_varying_size_varying_color_vert.glsl +++ b/source/blender/gpu/shaders/gpu_shader_3D_point_varying_size_varying_color_vert.glsl @@ -1,4 +1,6 @@ +uniform mat4 ModelViewProjectionMatrix; + #if __VERSION__ == 120 attribute vec3 pos; attribute float size; @@ -13,7 +15,7 @@ void main() { - gl_Position = gl_ModelViewProjectionMatrix * vec4(pos, 1.0); + gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0); gl_PointSize = size; finalColor = color; } diff --git a/source/blender/gpu/shaders/gpu_shader_3D_smooth_color_vert.glsl b/source/blender/gpu/shaders/gpu_shader_3D_smooth_color_vert.glsl index 20b5e126736..22c2cfa8b93 100644 --- a/source/blender/gpu/shaders/gpu_shader_3D_smooth_color_vert.glsl +++ b/source/blender/gpu/shaders/gpu_shader_3D_smooth_color_vert.glsl @@ -1,4 +1,6 @@ +uniform mat4 ModelViewProjectionMatrix; + #if __VERSION__ == 120 attribute vec3 pos; attribute vec4 color; @@ -13,6 +15,6 @@ void main() { - gl_Position = gl_ModelViewProjectionMatrix * vec4(pos, 1.0); + gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0); finalColor = color; } |