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/res/raw/main_vertex_shader.glsl
28 28

  
29 29
out vec3 v_Position;                 //
30 30
out vec3 v_endPosition;              // for Transform Feedback only
31

  
32
#ifdef PREAPPLY
33
out vec3 v_Inflate;                  // Transform Feedback for preapply effects
34
#endif
35

  
31 36
out vec3 v_Normal;                   //
32 37
out vec2 v_TexCoordinate;            //
33 38

  
......
95 100
  vec3 v = a_Position + u_Inflate*a_Inflate;
96 101
  vec3 n = a_Normal;
97 102

  
103
#ifdef PREAPPLY
104
  vec3 inf = a_Inflate;
105
#endif
106

  
98 107
#if NUM_VERTEX>0
99 108
  int effect=0;
100 109

  
......
110 119

  
111 120
#ifdef PREAPPLY
112 121
  v_endPosition   = n;
122
  v_Inflate       = inf;
113 123
#else
114 124
  v_endPosition   = v + 0.5*n;
115 125
#endif

Also available in: Unified diff