projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed bug invalid memory write
[carveJwlIkooP6JGAAIwe30JlM.git]
/
shaders
/
cloud.vs
diff --git
a/shaders/cloud.vs
b/shaders/cloud.vs
index 88b0d4dd721dd438cacd726c1e3dac09eac0bcd9..580dc207c4c55a92297d104a44899679927366af 100644
(file)
--- a/
shaders/cloud.vs
+++ b/
shaders/cloud.vs
@@
-24,7
+24,7
@@
vec3 gridify( vec3 p, float s, float t )
{
vec3 co = p*s;
vec2 r2 = rand_hash22(p.xz);
{
vec3 co = p*s;
vec2 r2 = rand_hash22(p.xz);
- vec3 grid =
vec3(floor(co.x),co.y,floor(co.z
)) * (1.0/s);
+ vec3 grid =
(vec3(floor(co.x),co.y,floor(co.z))+vec3(0.5,0.0,0.5
)) * (1.0/s);
float t1 = 1.0-t;
t1 = 1.0-t1*t1;
float t1 = 1.0-t;
t1 = 1.0-t1*t1;
@@
-46,7
+46,7
@@
void main()
vs_motion_out( vproj0, vproj1 );
gl_Position = vproj0;
vs_motion_out( vproj0, vproj1 );
gl_Position = vproj0;
- gl_PointSize = (9.0*scaler) / (
gl_Position.z + 0.01
);
+ gl_PointSize = (9.0*scaler) / (
max( gl_Position.z, 2.0 )
);
aWorldCo = world_pos0;
aColour = a_colour*scaler*(1.0-uAnim.y*uAnim.y);
aCo = co;
aWorldCo = world_pos0;
aColour = a_colour*scaler*(1.0-uAnim.y*uAnim.y);
aCo = co;