Revision 44efc8a8
Added by Leszek Koltunski about 8 years ago
src/main/res/raw/main_vertex_shader.glsl | ||
---|---|---|
234 | 234 |
float denomV = 1.0 / (aForce.y + Aw.x); |
235 | 235 |
float denomH = 1.0 / (aForce.x + Aw.y); |
236 | 236 |
|
237 |
vec2 vertCorr= ONE - aPS / ( aForce+C*aPS + (ONE-sign(aForce)) ); |
|
237 |
vec2 vertCorr= ONE - aPS / ( aForce+C*aPS + (ONE-sign(aForce)) ); // avoid division by 0 when force and PS both are 0
|
|
238 | 238 |
|
239 | 239 |
float mvXvert = -B * ps.x * aForce.y * (1.0-quot.y) * denomV; // impact the vertical component of the force vector has on horizontal movement |
240 | 240 |
float mvYhorz = -B * ps.y * aForce.x * (1.0-quot.x) * denomH; // impact the horizontal component of the force vector has on vertical movement |
Also available in: Unified diff
Improve the Deform app