Revision de77a6c5
Added by Leszek Koltunski about 3 years ago
src/main/res/raw/main_fragment_shader.glsl | ||
---|---|---|
45 | 45 |
#endif |
46 | 46 |
|
47 | 47 |
#if NUM_FRAGMENT>0 |
48 |
uniform int fNumEffects; // total number of fragment effects |
|
48 |
uniform int fNumEffects; // total number of fragment effects
|
|
49 | 49 |
|
50 | 50 |
layout (std140) uniform fUniformProperties |
51 | 51 |
{ |
52 |
ivec4 fProperties[NUM_FRAGMENT]; // their properties, 4 ints: |
|
53 |
// name of the effect, unused, unused, unused |
|
52 |
ivec4 fProperties[NUM_FRAGMENT]; // their properties, 4 ints: |
|
53 |
// name of the effect, unused, unused, unused |
|
54 |
}; |
|
55 |
|
|
56 |
layout (std140) uniform fUniformFloats |
|
57 |
{ |
|
58 |
vec4 fUniforms[3*NUM_FRAGMENT]; // i-th effect is 3 consecutive vec4's: [3*i], [3*i+1], [3*i+2]. |
|
59 |
// The first vec4 is the Interpolated values, |
|
60 |
// second vec4: first float - cache, next 3: Center, the third - the Region. |
|
54 | 61 |
}; |
55 | 62 |
|
56 |
uniform vec4 fUniforms[3*NUM_FRAGMENT]; // i-th effect is 3 consecutive vec4's: [3*i], [3*i+1], [3*i+2]. |
|
57 |
// The first vec4 is the Interpolated values, |
|
58 |
// second vec4: first float - cache, next 3: Center, the third - the Region. |
|
59 | 63 |
#endif // NUM_FRAGMENT>0 |
60 | 64 |
|
61 | 65 |
#ifdef OIT |
Also available in: Unified diff
Introduce another Uniform Block Object. Now we can have much more vertex and fragment effects - up their default number to 100.