projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
better water
[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 float aOpacity;
12
13
void main()
14
{
15
vec3 world_pos = uMdl * vec4(a_co,1.0);
16
gl_Position = uPv * vec4(world_pos,1.0);
17
18
aColour = a_colour;
19
aUv = a_uv;
20
aNorm = mat3(uMdl) * a_norm;
21
aCo = a_co;
22
aOpacity = 1.0-(gl_Position.y+0.5)*uOpacity;
23
}