Revision 5e96393c
Added by Leszek Koltunski over 5 years ago
src/main/java/org/distorted/library/effect/VertexEffectSink.java | ||
---|---|---|
66 | 66 |
addEffect(EffectName.SINK, |
67 | 67 |
|
68 | 68 |
"vec3 center = vUniforms[effect+1].yzw; \n" |
69 |
+ "vec3 ps = center-v.xyz; \n"
|
|
69 |
+ "vec3 ps = center-v; \n" |
|
70 | 70 |
+ "float h = vUniforms[effect].x; \n" |
71 | 71 |
+ "float t = degree(vUniforms[effect+2],center,ps) * (1.0-h)/max(1.0,h); \n" |
72 | 72 |
|
73 |
+ "v.xy += t*ps.xy;"
|
|
73 |
+ "v += t*ps;"
|
|
74 | 74 |
); |
75 | 75 |
} |
76 | 76 |
|
Also available in: Unified diff
Make the Sink effect fully 3D.