Revision 687263cc
Added by Leszek Koltunski about 4 years ago
src/main/java/org/distorted/examples/earth/EarthRenderer.java | ||
---|---|---|
116 | 116 |
scale.add(mScaleFactor); |
117 | 117 |
|
118 | 118 |
mMesh = new MeshSphere(LEVEL); |
119 |
mTexture = new DistortedTexture(SIZE,SIZE);
|
|
119 |
mTexture = new DistortedTexture(); |
|
120 | 120 |
|
121 |
mObjWidth = mTexture.getWidth(); |
|
122 |
mObjHeight= mTexture.getHeight(); |
|
123 |
mObjDepth = mTexture.getDepth(mMesh); |
|
121 |
mObjWidth = mObjHeight = mObjDepth = SIZE; |
|
124 | 122 |
|
125 | 123 |
mQuat1 = new Static4D(0,0,0,1); // unity |
126 | 124 |
mQuat2 = new Static4D(0,0,0,1); // quaternions |
... | ... | |
131 | 129 |
quatInt1.add(mQuat1); |
132 | 130 |
quatInt2.add(mQuat2); |
133 | 131 |
|
134 |
mEffects = new DistortedEffects(); |
|
132 |
mEffects = new DistortedEffects(SIZE,SIZE,SIZE);
|
|
135 | 133 |
mEffects.apply( new MatrixEffectQuaternion(quatInt2, mCenter) ); |
136 | 134 |
mEffects.apply( new MatrixEffectQuaternion(quatInt1, mCenter) ); |
137 | 135 |
mEffects.apply( new MatrixEffectScale(scale)); |
Also available in: Unified diff
Move the 'pre-multiply mesh before applying any effects' thing from [(Xsize of texture, Ysize of texture) x Mesh's zFactor] to Effects.setStretch(sx,sy,sz)