Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gpu_shader_text_simple_vert.glsl « shaders « gpu « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a8a79ffe6c98624a35c7941fbfe2675f48a903af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

/* 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;
}