projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
checkin
[carveJwlIkooP6JGAAIwe30JlM.git]
/
shaders
/
character.vs
diff --git
a/shaders/character.vs
b/shaders/character.vs
index 63b755b76485be57af34dbe24e50ac4b2c38d226..997ecc5fc0d3ae1e504d4366a92fb6b628d1cfc1 100644
(file)
--- a/
shaders/character.vs
+++ b/
shaders/character.vs
@@
-13,11
+13,12
@@
out float aOpacity;
void main()
{
vec3 world_pos = uMdl * vec4(a_co,1.0);
void main()
{
vec3 world_pos = uMdl * vec4(a_co,1.0);
- gl_Position = uPv * vec4(world_pos,1.0);
+ vec4 clip_pos = uPv * vec4(world_pos,1.0);
+ gl_Position = clip_pos;
aColour = a_colour;
aUv = a_uv;
aNorm = mat3(uMdl) * a_norm;
aColour = a_colour;
aUv = a_uv;
aNorm = mat3(uMdl) * a_norm;
- aCo =
a_co
;
- aOpacity = 1.0-(gl_Position.y+0.5)*uOpacity;
+ aCo =
world_pos
;
+ aOpacity =
max(clip_pos.w*3.0,0.1);//
1.0-(gl_Position.y+0.5)*uOpacity;
}
}