Project

General

Profile

« Previous | Next » 

Revision 96e3b88a

Added by Leszek Koltunski over 3 years ago

Introducing UBO to Effect Queues: step 1.

View differences:

src/main/res/raw/main_vertex_shader.glsl
49 49
#if NUM_VERTEX>0
50 50
uniform int vNumEffects;             // total number of vertex effects
51 51
uniform int vName[NUM_VERTEX];       // their names.
52
uniform int vEffAndAssoc[NUM_VERTEX];// Associations of the vertex effects. Those are used to connect an effect to a Mesh component.
53
uniform int vEffEquAssoc[NUM_VERTEX];// Components the vertex effects work on. Likewise used to connect an effect to a Mesh component.
54

  
52 55
uniform vec4 vUniforms[3*NUM_VERTEX];// i-th effect is 3 consecutive vec4's: [3*i], [3*i+1], [3*i+2].
53 56
                                     // The first vec4 is the Interpolated values,
54 57
                                     // second vec4: first float - cache, next 3: Center, the third -  the Region.
55
uniform int vEffAndAssoc[NUM_VERTEX];// Associations of the vertex effects. Those are used to connect an effect to a Mesh component.
56
uniform int vEffEquAssoc[NUM_VERTEX];// Components the vertex effects work on. Likewise used to connect an effect to a Mesh component.
57 58

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

Also available in: Unified diff