Revision 2f1f7570
Added by Leszek Koltunski over 5 years ago
src/main/java/org/distorted/library/main/EffectQueueMatrix.java | ||
---|---|---|
103 | 103 |
float xLenInPixels = projection.mWidth *(mMaxX-mMinX)/2; |
104 | 104 |
float yLenInPixels = projection.mHeight*(mMaxY-mMinY)/2; |
105 | 105 |
|
106 |
// already margin / min(xLen,yLen) is the size of the halo.
|
|
106 |
// already margin / avg(xLen,yLen) is the size of the halo.
|
|
107 | 107 |
// Here we need a bit more because we are marking not only the halo, but a little bit around |
108 | 108 |
// it as well so that the (blur for example) will be smooth on the edges. Thus the 2.0f. |
109 |
// ( 4.0 because there is an extra 2.0 from the avg(xLen,yLen) ) |
|
109 | 110 |
// |
110 | 111 |
// mMipmap ( 1.0, 0.5, 0.25, 0.125 ) - we need to make the size of the halo independent |
111 | 112 |
// of postprocessing effect quality. |
112 | 113 |
|
113 |
return projection.mMipmap*2.0f*marginInPixels/( xLenInPixels>yLenInPixels ? yLenInPixels:xLenInPixels );
|
|
114 |
return projection.mMipmap*4.0f*marginInPixels/( xLenInPixels+yLenInPixels );
|
|
114 | 115 |
} |
115 | 116 |
|
116 | 117 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Properly clean up static varaibles in the Effect classes!