Project

General

Profile

« Previous | Next » 

Revision 0bd9f644

Added by Leszek Koltunski over 3 years ago

Introduce an UBO to the vertex shader holding info about mesh effect associations.

View differences:

src/main/res/raw/main_vertex_shader.glsl
39 39
out vec3 v_Normal;                   //
40 40
out vec2 v_TexCoordinate;            //
41 41

  
42
uniform mat4 u_MVPMatrix;            // the combined model/view/projection matrix.
42
uniform mat4 u_MVPMatrix;            // u_MVMatrixP * projection.
43 43
uniform mat4 u_MVMatrixP;            // the combined model/view matrix. (for points)
44 44
uniform mat4 u_MVMatrixV;            // the combined model/view matrix. (for vectors)
45 45
                                     // which need to work differently on points and vectors
......
54 54
                                     // second vec4: first float - cache, next 3: Center, the third -  the Region.
55 55
uniform int vEffAndAssoc[NUM_VERTEX];// Associations of the vertex effects. Those are used to connect an effect to a Mesh component.
56 56
uniform int vEffEquAssoc[NUM_VERTEX];// Components the vertex effects work on. Likewise used to connect an effect to a Mesh component.
57
uniform int vComAndAssoc[MAX_COMPON];// 'logical AND' association of the component.
58
uniform int vComEquAssoc[MAX_COMPON];// 'equal' association of the component.
57

  
58
layout (std140, binding=1) uniform meshAssociation
59
  {
60
  int vComAndAssoc[MAX_COMPON]; // 'logical AND' association of the component.
61
  int vComEquAssoc[MAX_COMPON]; // 'equal' association of the component.
62
  };
59 63

  
60 64
//////////////////////////////////////////////////////////////////////////////////////////////
61 65
// HELPER FUNCTIONS

Also available in: Unified diff