-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfull.vert
30 lines (24 loc) · 1.01 KB
/
full.vert
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
///////////////////////////////////////////////////////
//*-------------------------------------------------*//
//| Part of Project One (https://www.maus-games.at) |//
//*-------------------------------------------------*//
//| Copyright (c) 2010 Martin Mauersics |//
//| Released under the zlib License |//
//*-------------------------------------------------*//
///////////////////////////////////////////////////////
#include "engine/data_transform_2d.glsl"
// shader output
varying vec2 v_v2CenterCoord; //
void VertexMain()
{
// transform position
gl_Position = coreObject2DPosition();
// forward simplified texture coordinates
vec2 v2BaseCoord = a_v2LowPosition + vec2(0.5);
v_av2TexCoord[0] = v2BaseCoord;
v_av2TexCoord[1] = v2BaseCoord * u_v2TexSize + u_v2TexOffset;
v_av2TexCoord[2] = v2BaseCoord * 3.0; // for transition
v_av2TexCoord[3] = v2BaseCoord * 2.0 - 1.0; // for transition
//
v_v2CenterCoord = v_av2TexCoord[1] - vec2(0.5);
}