Project

General

Profile

« Previous | Next » 

Revision 815869cb

Added by Leszek Koltunski about 8 years ago

Vertex positions fully 3D now. Remaining: normals!

View differences:

src/main/res/raw/main_vertex_shader.glsl
363 363
  float d = -ps.x*cosB-ps.y*sinB;
364 364
  float num = length==0.0 ? 0.0 : d / length;
365 365

  
366
  v.xy += (sin(1.578*num)*amplitude*deg*vec2(sinB,cosB));
366
  vec3 dv = sin(1.578*num)*amplitude*deg*vec3(sinB*cosA,cosB*cosA,sinA);
367

  
368
  v.xyz += dv;
367 369
  }
368 370

  
369 371
#endif

Also available in: Unified diff