Project

General

Profile

« Previous | Next » 

Revision 6f2d931d

Added by Leszek Koltunski over 5 years ago

Added a new attribute to vertices of a MeshBase object: the vec3 'inflate' vector.
This vector describes the direction where the vertex needs to be moved when we 'inflate' the whole mesh.
If the mesh is locally smooth, this is simply the normal vector; otherwise (for example in the corners of the MeshCubes) - not.

Currently the new attribute is always set to (1,0,0) and not used yet.

View differences:

src/main/res/raw/main_vertex_shader.glsl
22 22

  
23 23
in vec3 a_Position;                  // Per-vertex position.
24 24
in vec3 a_Normal;                    // Per-vertex normal vector.
25
in vec3 a_Inflate;                   // This vector describes the direction this vertex needs to go when we 'inflate' the whole mesh.
26
                                     // If the mesh is locally smooth, this is equal to the normal vector. Otherwise (on sharp edges) - no.
25 27
in vec2 a_TexCoordinate;             // Per-vertex texture coordinate.
28

  
26 29
out vec3 v_Position;                 //
27 30
out vec3 v_endPosition;              // for Transform Feedback only
28 31
out vec3 v_Normal;                   //

Also available in: Unified diff