Revision 78ff6ea9
Added by Leszek Koltunski about 3 years ago
src/main/res/raw/main_fragment_shader.glsl | ||
---|---|---|
46 | 46 |
|
47 | 47 |
#if NUM_FRAGMENT>0 |
48 | 48 |
uniform int fNumEffects; // total number of fragment effects |
49 |
uniform int fName[NUM_FRAGMENT]; // their namess. |
|
49 |
|
|
50 |
layout (std140) uniform fUniformProperties |
|
51 |
{ |
|
52 |
ivec4 fProperties[NUM_FRAGMENT]; // their properties, 4 ints: |
|
53 |
// name of the effect, unused, unused, unused |
|
54 |
}; |
|
55 |
|
|
50 | 56 |
uniform vec4 fUniforms[3*NUM_FRAGMENT]; // i-th effect is 3 consecutive vec4's: [3*i], [3*i+1], [3*i+2]. |
51 | 57 |
// The first vec4 is the Interpolated values, |
52 | 58 |
// second vec4: first float - cache, next 3: Center, the third - the Region. |
Also available in: Unified diff
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.