Project

General

Profile

« Previous | Next » 

Revision 78ff6ea9

Added by Leszek Koltunski over 3 years ago

Convert the Integer part (i.e. effect names and the two associations) of vertex and fragment shaders to Uniform Buffer Objects.
Next: convert the last part, i.e. the float effect parameters.

View differences:

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

  
47 47
#if NUM_VERTEX>0
48 48
uniform int vNumEffects;              // total number of vertex effects
49
uniform ivec4 vProperties[NUM_VERTEX];// their properties, 4 ints:
49

  
50
layout (std140) uniform vUniformProperties
51
  {
52
  ivec4 vProperties[NUM_VERTEX];      // their properties, 4 ints:
50 53
                                      // 1: name of the effect
51 54
                                      // 2: effect's AND association
52 55
                                      // 3: reserved int (probably another AND assoc in the future)
53 56
                                      // 4: effect's EQU association
57
  };
54 58

  
55 59
uniform vec4 vUniforms[3*NUM_VERTEX]; // i-th effect is 3 consecutive vec4's: [3*i], [3*i+1], [3*i+2].
56 60
                                      // The first vec4 is the Interpolated values,

Also available in: Unified diff