diff options
author | Mike Erwin <significant.bit@gmail.com> | 2016-09-17 14:54:30 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2016-09-17 14:54:30 +0300 |
commit | e21853abb9fee9936f0a2d257a5b110535f0937e (patch) | |
tree | 332bee4889f0bc6b1fd07291614550347a9f4f77 /source/blender/gpu/shaders/gpu_shader_text_vert.glsl | |
parent | 1b1275f0db85101345def817fee486beebaa6b9a (diff) |
OpenGL: streamline font rendering
Ignore texture matrix in the shader, stop messing with texture matrix in BLF code.
Use linear screen-space interpolation instead of perspective.
Avoid redundant call to glMatrixMode.
Diffstat (limited to 'source/blender/gpu/shaders/gpu_shader_text_vert.glsl')
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_text_vert.glsl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_text_vert.glsl b/source/blender/gpu/shaders/gpu_shader_text_vert.glsl index 8449c4229b3..72479401568 100644 --- a/source/blender/gpu/shaders/gpu_shader_text_vert.glsl +++ b/source/blender/gpu/shaders/gpu_shader_text_vert.glsl @@ -5,12 +5,12 @@ // - generic attrib inputs (2D pos, tex coord) flat varying vec4 color; -varying vec2 texcoord; +noperspective varying vec2 texcoord; void main() { gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; color = gl_Color; - texcoord = (gl_TextureMatrix[0] * gl_MultiTexCoord0).st; + texcoord = gl_MultiTexCoord0.st; } |