diff options
author | Mike Erwin <significant.bit@gmail.com> | 2016-10-10 06:03:35 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2016-10-10 06:03:35 +0300 |
commit | 7a60f889d3f328e38aa882891cda615a06333ab6 (patch) | |
tree | f83e9f3e9df86f7d8da5027773acd980d6f7c94c /source/blender/gpu/shaders/gpu_shader_2D_point_varying_size_varying_color_vert.glsl | |
parent | e636529e33a2a2dc7d9acfed44325e2b38be86ac (diff) |
OpenGL: plug new matrix system into shaders (WIP)
Built-in shaders now use uniforms instead of legacy built-in matrices. So far I only hooked this up for new immediate mode.
We use the same matrix naming convention as OpenGL, but without the gl_ prefix, e.g. gl_ModelView becomes ModelView.
Right now it can skip the new matrix stack and use the legacy built-in matrices app-side. This will help us transition gradually from glMatrix functions to gpuMatrix functions.
Still some work to do in gpuBindMatrices. See TODO comments in gpu_matrix.c for specifics.
Diffstat (limited to 'source/blender/gpu/shaders/gpu_shader_2D_point_varying_size_varying_color_vert.glsl')
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_2D_point_varying_size_varying_color_vert.glsl | 4 |
1 files changed, 3 insertions, 1 deletions
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; } |