Revision 35e7d841
Added by Leszek Koltunski over 4 years ago
src/main/java/org/distorted/library/effectqueue/EffectQueueFragment.java | ||
---|---|---|
88 | 88 |
|
89 | 89 |
if( mNumEffects>0 ) |
90 | 90 |
{ |
91 |
/* |
|
91 | 92 |
for(int i=0; i<mNumEffects; i++) |
92 | 93 |
{ |
93 | 94 |
String f = |
... | ... | |
106 | 107 |
|
107 | 108 |
android.util.Log.e("frag", i+" name: "+mIntUniforms[i]+" float: "+f); |
108 | 109 |
} |
109 |
|
|
110 |
*/ |
|
110 | 111 |
GLES30.glUniform1iv( mNameH[variant] , mNumEffects, mIntUniforms , 0); |
111 | 112 |
GLES30.glUniform4fv( mUniformsH[variant],(NUM_FLOAT_UNIFORMS/4)*mNumEffects, mFloatUniforms, 0); |
112 | 113 |
} |
src/main/res/raw/main_fragment_shader.glsl | ||
---|---|---|
120 | 120 |
diff = (v_Position - fUniforms[effect+1].yzw)/fUniforms[effect+2].xyz; |
121 | 121 |
degree = max(0.0,1.0-dot(diff,diff)); |
122 | 122 |
|
123 |
color.a *= (degree*(fUniforms[effect].x-1.0)+1.0); |
|
124 |
|
|
125 | 123 |
// ENABLED EFFECTS WILL BE INSERTED HERE |
126 | 124 |
|
127 | 125 |
effect+=3; |
Also available in: Unified diff
Bugfix.