This repository has been archived on 2023-10-09. You can view files and clone it, but cannot push or open issues or pull requests.
Files
blender-archive/source/blender/gpu/shaders/gpu_shader_text_simple_vert.glsl
Campbell Barton e12c08e8d1 ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.

For details on usage and instructions for migrating branches
without conflicts, see:

https://wiki.blender.org/wiki/Tools/ClangFormat
2019-04-17 06:21:24 +02:00

23 lines
483 B
GLSL

/* Simpler version of gpu_shader_text_vert that supports only 2D translation. */
uniform mat4 ModelViewProjectionMatrix;
in vec4 pos; /* rect */
in vec4 tex; /* rect */
in vec4 col;
out vec4 pos_rect;
out vec4 tex_rect;
out vec4 color;
void main()
{
/* Manual mat4*vec2 */
pos_rect = ModelViewProjectionMatrix[0].xyxy * pos.xxzz;
pos_rect += ModelViewProjectionMatrix[1].xyxy * pos.yyww;
pos_rect += ModelViewProjectionMatrix[3].xyxy;
tex_rect = tex;
color = col;
}