Revision 472e51e1
Added by Leszek Koltunski over 7 years ago
src/main/java/org/distorted/library/DistortedEffectsPostprocess.java | ||
---|---|---|
299 | 299 |
mP.mQualityLevel = level; |
300 | 300 |
mP.mQualityScale = 1.0f; |
301 | 301 |
|
302 |
for(int i=0; i<level; i++) mP.mQualityScale*=0.5f;
|
|
302 |
for(int i=0; i<level; i++) mP.mQualityScale*=EffectQuality.MULTIPLIER;
|
|
303 | 303 |
} |
304 | 304 |
|
305 | 305 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/library/DistortedOutputSurface.java | ||
---|---|---|
186 | 186 |
mBuffer2[j] = new DistortedFramebuffer(false , DistortedSurface.TYPE_SYST, |
187 | 187 |
(int)(mWidth*mipmap), (int)(mHeight*mipmap) ); |
188 | 188 |
mBuffer1[j].mMipmap = mipmap; |
189 |
mipmap *= 0.5f;
|
|
189 |
mipmap *= EffectQuality.MULTIPLIER;
|
|
190 | 190 |
} |
191 | 191 |
DistortedSurface.toDo(); // create immediately |
192 | 192 |
} |
src/main/java/org/distorted/library/EffectQuality.java | ||
---|---|---|
37 | 37 |
|
38 | 38 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
39 | 39 |
|
40 |
final static float MULTIPLIER = 0.5f; // each next Quality level renders into 1/0.5 smaller buffers |
|
40 | 41 |
final static int LENGTH = values().length; |
41 | 42 |
|
42 | 43 |
final int level; |
Also available in: Unified diff
Minor.