diff options
Diffstat (limited to 'source/blender/gpu/shaders/gpu_shader_text_vert.glsl')
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_text_vert.glsl | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_text_vert.glsl b/source/blender/gpu/shaders/gpu_shader_text_vert.glsl new file mode 100644 index 00000000000..44568f28c8e --- /dev/null +++ b/source/blender/gpu/shaders/gpu_shader_text_vert.glsl @@ -0,0 +1,24 @@ + +uniform mat4 ModelViewProjectionMatrix; + +#if __VERSION__ == 120 + attribute vec2 pos; + attribute vec2 texCoord; + attribute vec4 color; + flat varying vec4 color_flat; + noperspective varying vec2 texCoord_interp; +#else + in vec2 pos; + in vec2 texCoord; + in vec4 color; + flat out vec4 color_flat; + noperspective out vec2 texCoord_interp; +#endif + +void main() +{ + gl_Position = ModelViewProjectionMatrix * vec4(pos, 0.0, 1.0); + + color_flat = color; + texCoord_interp = texCoord; +} |