Revision c50a38f9
Added by Leszek Koltunski over 5 years ago
| src/main/java/org/distorted/examples/multiblur/MultiblurRenderer.java | ||
|---|---|---|
| 62 | 62 |
}; |
| 63 | 63 |
|
| 64 | 64 |
private static final int NUM_OBJECTS = MOVE_VEC.length/3; |
| 65 |
private static final int OBJ_SIZE = 100; |
|
| 66 | 65 |
|
| 67 | 66 |
private GLSurfaceView mView; |
| 68 | 67 |
private DistortedTexture mTex1, mTex2; |
| ... | ... | |
| 101 | 100 |
mBlurHaloRadius = new Static2D(10,2); |
| 102 | 101 |
|
| 103 | 102 |
MeshCubes mesh = new MeshCubes(1,1,1); |
| 104 |
mesh.setStretch(OBJ_SIZE,OBJ_SIZE,OBJ_SIZE); |
|
| 105 | 103 |
|
| 106 | 104 |
mTex1 = new DistortedTexture(); |
| 107 | 105 |
mTex2 = new DistortedTexture(); |
| ... | ... | |
| 164 | 162 |
public void onSurfaceChanged(GL10 glUnused, int width, int height) |
| 165 | 163 |
{
|
| 166 | 164 |
mScreenMin = Math.min(width, height); |
| 167 |
float factor= 0.15f*mScreenMin/OBJ_SIZE;
|
|
| 165 |
float factor= 0.15f*mScreenMin; |
|
| 168 | 166 |
mScale.set(factor,factor,factor); |
| 169 | 167 |
computeMoveVectors(); |
| 170 | 168 |
mScreen.resize(width, height); |
| ... | ... | |
| 212 | 210 |
|
| 213 | 211 |
private void computeMoveVectors() |
| 214 | 212 |
{
|
| 215 |
float size= 0.026f*OBJ_SIZE*mDistance;
|
|
| 213 |
float size= 0.026f*mDistance; |
|
| 216 | 214 |
|
| 217 | 215 |
for(int i=0; i<NUM_OBJECTS; i++) |
| 218 | 216 |
{
|
Also available in: Unified diff
Convert Multiblur to stretchless API.