Project

General

Profile

« Previous | Next » 

Revision e54bfada

Added by Leszek Koltunski almost 4 years ago

Have VERTEX_QUATERNION, VERTEX_ROTATE and VERTEX_SHEAR modify inflate vectors.
Split Vertex attribute array into two (the one modified by preapply effects and the one not)

View differences:

src/main/java/org/distorted/library/effect/VertexEffectShear.java
73 73

  
74 74
    + "n.x = new_nx;                                 \n"
75 75
    + "n.y = new_ny;                                 \n"
76
    + "n.z = new_nz;                                 \n";
76
    + "n.z = new_nz;                                 \n"
77

  
78
    + "#ifdef PREAPPLY                               \n"
79

  
80
    + "float new_ix = (1.0+sx*sy)*inf.x + sx*inf.y;  \n"
81
    + "float new_iy = sy*inf.x + inf.y;              \n"
82
    + "float new_iz = sz*inf.y + inf.z;              \n"
83

  
84
    + "inf.x = new_ix;                               \n"
85
    + "inf.y = new_iy;                               \n"
86
    + "inf.z = new_iz;                               \n"
87

  
88
    + "#endif                                        \n";
77 89
    }
78 90

  
79 91
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff