Revision 78ff6ea9
Added by Leszek Koltunski over 3 years ago
src/main/java/org/distorted/library/effect/FragmentEffect.java | ||
---|---|---|
33 | 33 |
*/ |
34 | 34 |
public static final int NUM_FLOAT_UNIFORMS = 12; |
35 | 35 |
/** |
36 |
* 1: the name
|
|
36 |
* 4: the name, unused, unused, unused
|
|
37 | 37 |
*/ |
38 |
public static final int NUM_INT_UNIFORMS = 1;
|
|
38 |
public static final int NUM_INT_UNIFORMS = 4;
|
|
39 | 39 |
|
40 | 40 |
static final int VALUES_OFFSET = 0; |
41 | 41 |
static final int CENTER_OFFSET = 5; |
... | ... | |
67 | 67 |
|
68 | 68 |
mGLSL += |
69 | 69 |
|
70 |
"if( fName[i]=="+effect1+")\n"
|
|
70 |
"if( fProperties[i].x =="+effect1+")\n"
|
|
71 | 71 |
+ "{\n" |
72 | 72 |
+ "degree = sign(degree); \n" |
73 | 73 |
+ code +"\n" |
74 | 74 |
+ "}\n" |
75 | 75 |
+"else\n" |
76 |
+"if( fName[i]=="+effect2+")\n"
|
|
76 |
+"if( fProperties[i].x =="+effect2+")\n"
|
|
77 | 77 |
+ "{\n" |
78 | 78 |
+ code +"\n" |
79 | 79 |
+ "}\n" |
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.