Revision 350cc2f5
Added by Leszek Koltunski over 7 years ago
src/main/res/raw/main_vertex_shader.glsl | ||
---|---|---|
425 | 425 |
|
426 | 426 |
if( deg != 0.0 && length != 0.0 ) |
427 | 427 |
{ |
428 |
float alpha = vUniforms[effect].z; |
|
429 |
float beta = vUniforms[effect].w; |
|
428 |
float offset= vUniforms[effect ].z; |
|
429 |
float alpha = vUniforms[effect ].w; |
|
430 |
float beta = vUniforms[effect+1].x; |
|
430 | 431 |
|
431 | 432 |
float sinA = sin(alpha); |
432 | 433 |
float cosA = cos(alpha); |
433 | 434 |
float sinB = sin(beta); |
434 | 435 |
float cosB = cos(beta); |
435 | 436 |
|
436 |
float angle= 1.578*(ps.x*cosB-ps.y*sinB) / length; |
|
437 |
float angle= 1.578*(ps.x*cosB-ps.y*sinB) / length + offset;
|
|
437 | 438 |
|
438 |
vec3 dir = vec3(sinB*cosA,cosB*cosA,sinA);
|
|
439 |
vec3 dir= vec3(sinB*cosA,cosB*cosA,sinA); |
|
439 | 440 |
|
440 | 441 |
v.xyz += sin(angle)*deg*dir; |
441 | 442 |
|
Also available in: Unified diff
Make the WAVE effect 5D (extra parameter 'offset')