Revision 5b829159
Added by Leszek Koltunski about 3 years ago
src/main/java/org/distorted/examples/triblur/TriblurRenderer.java | ||
---|---|---|
24 | 24 |
import android.opengl.GLSurfaceView; |
25 | 25 |
|
26 | 26 |
import org.distorted.examples.R; |
27 |
import org.distorted.library.effect.Effect; |
|
27 | 28 |
import org.distorted.library.effect.EffectQuality; |
28 | 29 |
import org.distorted.library.effect.EffectType; |
29 | 30 |
import org.distorted.library.effect.FragmentEffectChroma; |
... | ... | |
130 | 131 |
mEffectHalo[i] = new Static1D(10); |
131 | 132 |
mBlur[i] = new PostprocessEffectBlur(mEffectHaloRadius[i] ); |
132 | 133 |
mGlow[i] = new PostprocessEffectGlow(mEffectHaloRadius[i], new Static4D(1.0f,1.0f,1.0f,0.5f) ); |
133 |
mBord[i] = new PostprocessEffectBorder(mEffectHalo[i], new Static4D(0.0f,0.0f,0.0f,0.5f) );
|
|
134 |
mBord[i] = new PostprocessEffectBorder(mEffectHalo[i], new Static4D(0.0f,0.0f,0.0f,0.9f) );
|
|
134 | 135 |
chroma[i] = new FragmentEffectChroma( new Static1D(0.3f), chromaVector[i]); |
135 | 136 |
effects[i] = new DistortedEffects(); |
136 | 137 |
effects[i].apply(chroma[i]); |
... | ... | |
155 | 156 |
for(int i=0; i<NUM_OBJECTS; i++) |
156 | 157 |
{ |
157 | 158 |
mBlur[i].setQuality(quality); |
159 |
mGlow[i].setQuality(quality); |
|
160 |
mBord[i].setQuality(quality); |
|
158 | 161 |
} |
159 | 162 |
} |
160 | 163 |
|
... | ... | |
215 | 218 |
mTex.setTexture(bitmap); |
216 | 219 |
|
217 | 220 |
VertexEffectScale.enable(); |
218 |
PostprocessEffectBlur.enable(); |
|
219 | 221 |
FragmentEffectChroma.enable(); |
222 |
Effect.enableEffects(EffectType.POSTPROCESS); |
|
223 |
|
|
220 | 224 |
DistortedLibrary.onSurfaceCreated(mView.getContext(), this); |
221 | 225 |
} |
222 | 226 |
|
Also available in: Unified diff
Improvements for the new Border effect. Now works, but covers the object - to be corrected.