Revision 2b7d2abb
Added by Leszek Koltunski over 3 years ago
src/main/res/raw/main_fragment_shader.glsl | ||
---|---|---|
47 | 47 |
#if NUM_FRAGMENT>0 |
48 | 48 |
uniform int fNumEffects; // total number of fragment effects |
49 | 49 |
|
50 |
layout (std140) uniform fUniformProperties |
|
51 |
{ |
|
52 |
ivec4 fProperties[NUM_FRAGMENT]; // their properties, 4 ints: |
|
50 |
uniform ivec4 fProperties[NUM_FRAGMENT]; // their properties, 4 ints: |
|
53 | 51 |
// name of the effect, unused, unused, unused |
54 |
}; |
|
55 | 52 |
|
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]. |
|
53 |
uniform vec4 fUniforms[3*NUM_FRAGMENT]; // i-th effect is 3 consecutive vec4's: [3*i], [3*i+1], [3*i+2]. |
|
59 | 54 |
// The first vec4 is the Interpolated values, |
60 | 55 |
// second vec4: first float - cache, next 3: Center, the third - the Region. |
61 |
}; |
|
62 | 56 |
|
63 | 57 |
#endif // NUM_FRAGMENT>0 |
64 | 58 |
|
Also available in: Unified diff
Remove UBO from the fragment shader and come back to the default of only 5 concurrent fragment effects. All because UBOs in fragment shader crash on Adreno 510 and Adreno 506.