Revision 291705f6
Added by Leszek Koltunski over 7 years ago
src/main/res/raw/main_vertex_shader.glsl | ||
---|---|---|
148 | 148 |
// else if v.z > hH then v.z = (-(1-h)^2 * H^2)/(v.z-(2h-1)H) +H (function satisfying f(+hH)=+hH, f'(+hH)=1, lim f(x) = +H) |
149 | 149 |
// else v.z = v.z |
150 | 150 |
|
151 |
void restrict(inout float v) |
|
151 |
void restrictZ(inout float v)
|
|
152 | 152 |
{ |
153 | 153 |
const float h = 0.7; |
154 | 154 |
float signV = 2.0*max(0.0,sign(v))-1.0; |
... | ... | |
496 | 496 |
else if( vType[i]==WAVE ) wave (3*i,v,n); |
497 | 497 |
} |
498 | 498 |
|
499 |
restrict(v.z);
|
|
499 |
restrictZ(v.z);
|
|
500 | 500 |
#endif |
501 | 501 |
|
502 | 502 |
v_Position = v.xyz; |
Also available in: Unified diff
re-generate noise after passing each Point.