Revision 1bbe1af2
Added by Leszek Koltunski about 7 years ago
src/main/java/org/distorted/examples/effects3d/Effects3DRenderer.java | ||
---|---|---|
234 | 234 |
float factorBackY = ((float)height)/backgroundSize; |
235 | 235 |
|
236 | 236 |
// quite tricky: move the background exactly to the FAR plane! (see DistortedOutputSurface.setProjection() ) |
237 |
mBackgroundEffects.move(new Static3D( -width/2, -height/2, -height*(1.0f-NEAR)/(2.0f*(float)Math.tan(FOV*Math.PI/360))) ); |
|
237 |
mBackgroundEffects.move(new Static3D( -width/2, -height/2, -0.9f*height*(1.0f-NEAR)/(2.0f*(float)Math.tan(FOV*Math.PI/360))) );
|
|
238 | 238 |
mBackgroundEffects.scale(new Static3D(2*factorBackX, 2*factorBackY, 1.0f) ); |
239 | 239 |
|
240 | 240 |
mScreen.resize(width, height); |
Also available in: Unified diff
Some corrections so that most apps still work on the Android emulator (OpenGL ES 2.0-based)