Project

General

Profile

« Previous | Next » 

Revision e979d285

Added by Leszek Koltunski about 4 years ago

Add the first two VERTEX 'pseudo-matrix' effects: VERTEX_MOVE & VERTEX_QUATERNION i.e. implementations of those two MATRIX effects in VERTEX queue.

The point(s):

1) preparation for the upcoming MeshBase.preApply(VertexEffect effect) API that's going to supersede the current much more limited MeshBase.apply(MatrixEffect effect)
2) those can be put in any position in the VERTEX queue, whereas the Matrix effects always have to come last

View differences:

src/main/res/raw/main_vertex_shader.glsl
181 181
#endif
182 182
   
183 183
  v_Position      = v;
184
  v_endPosition   = v + 0.2*u_Stretch*n;
184
  v_endPosition   = v + (0.2*u_Stretch.x)*n;
185 185
  v_TexCoordinate = a_TexCoordinate;
186 186
  v_Normal        = normalize(vec3(u_MVMatrix*vec4(n,0.0)));
187 187
  gl_Position     = u_MVPMatrix*vec4(v,1.0);

Also available in: Unified diff