Ik revision
[carveJwlIkooP6JGAAIwe30JlM.git] / shaders / character.vs
1 #include "vertex_standard.glsl"
2
3 uniform mat4 uPv;
4 uniform mat4x3 uMdl;
5 uniform float uOpacity;
6
7 out vec4 aColour;
8 out vec2 aUv;
9 out vec3 aNorm;
10 out vec3 aCo;
11 out vec3 aWorldCo;
12 out float aOpacity;
13
14 void main()
15 {
16 vec3 world_pos = uMdl * vec4(a_co,1.0);
17 vec4 clip_pos = uPv * vec4(world_pos,1.0);
18 gl_Position = clip_pos;
19
20 aColour = a_colour;
21 aUv = a_uv;
22 aNorm = mat3(uMdl) * a_norm;
23 aWorldCo = world_pos;
24 aCo = a_co;
25 aOpacity = max(clip_pos.w*3.0,0.1);// 1.0-(gl_Position.y+0.5)*uOpacity;
26 }