Revision f256e1a5
Added by Leszek Koltunski about 8 years ago
src/main/res/raw/main_vertex_shader.glsl | ||
---|---|---|
400 | 400 |
// |
401 | 401 |
// d) compute the above and see that this is equal precisely to SX from (**). |
402 | 402 |
// e) repeat points b,c,d in direction Y and come up with (***). |
403 |
// |
|
404 |
// Note: we should avoid passing certain combinations of parameters to this function. One such known |
|
405 |
// combination is ( A: small but positive, B: any, amplitude >= length ). |
|
406 |
// In this case, certain 'unlucky' points have their normals almost horizontal (they got moved by (almost!) |
|
407 |
// amplitude, and other point length (i.e. <=amplitude) away got moved by 0, so the slope in this point is |
|
408 |
// very steep). Visual effect is: vast majority of surface pretty much unchanged, but random 'unlucky' |
|
409 |
// points very dark) |
|
410 |
// |
|
411 |
// Generally speaking I'd keep to amplitude < length, as the opposite case has some other problems as well. |
|
403 | 412 |
|
404 | 413 |
void wave(in int effect, inout vec4 v, inout vec4 n) |
405 | 414 |
{ |
Also available in: Unified diff
Improve the comment the WAVE effect.