Revision bdfec906
Added by Leszek Koltunski over 8 years ago
src/main/java/org/distorted/examples/effects2d/Effects2DActivity.java | ||
---|---|---|
81 | 81 |
getText(R.string.sink ).toString(), |
82 | 82 |
getText(R.string.alpha ).toString(), |
83 | 83 |
getText(R.string.brightness).toString(), |
84 |
getText(R.string.chroma ).toString()};
|
|
84 |
getText(R.string.chroma).toString()}; |
|
85 | 85 |
|
86 | 86 |
String[] itemsType = new String[] {"VERTEX", "FRAGMENT"}; |
87 | 87 |
|
... | ... | |
182 | 182 |
case 0: name = EffectNames.DISTORT ; break; |
183 | 183 |
case 1: name = EffectNames.SINK ; break; |
184 | 184 |
case 2: name = EffectNames.SMOOTH_ALPHA ; break; |
185 |
case 3: name = EffectNames.MACROBLOCK ; break;
|
|
185 |
case 3: name = EffectNames.BRIGHTNESS ; break;
|
|
186 | 186 |
case 4: name = EffectNames.SMOOTH_CHROMA; break; |
187 | 187 |
default: name = EffectNames.CONTRAST ; |
188 | 188 |
} |
src/main/java/org/distorted/examples/effects2d/Effects2DRenderer.java | ||
---|---|---|
92 | 92 |
} |
93 | 93 |
catch(Exception ex) |
94 | 94 |
{ |
95 |
android.util.Log.e("Scratchpad", ex.getMessage() );
|
|
95 |
android.util.Log.e("Effects2D", ex.getMessage() );
|
|
96 | 96 |
} |
97 | 97 |
} |
98 | 98 |
|
src/main/java/org/distorted/examples/effects2d/Effects2DSurfaceView.java | ||
---|---|---|
48 | 48 |
private static Static2D point; |
49 | 49 |
|
50 | 50 |
private static Static4D mRegion; |
51 |
private static Dynamic1D mInterA, mInterM, mInterC, mInterS;
|
|
51 |
private static Dynamic1D mInterA, mInterB, mInterC, mInterS;
|
|
52 | 52 |
|
53 | 53 |
private static Dynamic3D mInterD; |
54 | 54 |
private static Static3D v0, v1, v2, v3; |
... | ... | |
91 | 91 |
mInterC.add(new Static1D(1)); |
92 | 92 |
mInterC.add(new Static1D(0)); |
93 | 93 |
|
94 |
mInterM = new Dynamic1D(mDuration,mCount);
|
|
95 |
mInterM.add(new Static1D(1));
|
|
96 |
mInterM.add(new Static1D(10));
|
|
94 |
mInterB = new Dynamic1D(mDuration,mCount);
|
|
95 |
mInterB.add(new Static1D(0));
|
|
96 |
mInterB.add(new Static1D(1));
|
|
97 | 97 |
|
98 | 98 |
if(!isInEditMode()) |
99 | 99 |
{ |
... | ... | |
160 | 160 |
case 2: id = Effects2DRenderer.mBackground.alpha(mInterA, mRegion, true); |
161 | 161 |
act.effectAdded(id, EffectNames.ALPHA, EffectTypes.FRAGMENT); |
162 | 162 |
break; |
163 |
case 3: id = Effects2DRenderer.mBackground.macroblock(mInterM, mRegion);
|
|
164 |
act.effectAdded(id, EffectNames.MACROBLOCK, EffectTypes.FRAGMENT);
|
|
163 |
case 3: id = Effects2DRenderer.mBackground.brightness(mInterB, mRegion, false);
|
|
164 |
act.effectAdded(id, EffectNames.BRIGHTNESS, EffectTypes.FRAGMENT);
|
|
165 | 165 |
break; |
166 | 166 |
case 4: id = Effects2DRenderer.mBackground.chroma(mInterC, mRED, mRegion, true); |
167 | 167 |
act.effectAdded(id, EffectNames.CHROMA, EffectTypes.FRAGMENT); |
Also available in: Unified diff
Fix the 'Effects2D' app