Project

General

Profile

« Previous | Next » 

Revision 513b2e9c

Added by Leszek Koltunski almost 4 years ago

A lot of changes.

1) main vertex shader: remove support for degree_object. This functionality will hopefully come back when we introduce other than circular regions.
2) MeshBase: remove the need to set a Bounding box (this is the point of the whole thing - we wanted to get rid of this so that the advances in MeshJoined will be easier)
3) Set ground for removing the MeshBase.setStretch / getStretch (another thing needed to advance MeshJoined )
4) since we removed the Bounding box, we need to change the DEFORN effect to have 1 additional parameter, the 'radius' which takes over the function of the bounding box in the vertex shader.
5) since the'res no bounding box, simplify the postprocessing Halo (remove EffectQueueMatrix.magnify() )
6) adjust applications.

After this we will hopefully be ready to introduce MeshBase.preApply(VertexEffect), i.e. bending several simple Meshes with any VertexEffect - including the freshly-introduced PseudoMatrix-Vertex effects like VertexEffectScale - and then combining them into one MeshJoined.

View differences:

src/main/java/org/distorted/examples/earth/EarthRenderer.java
210 210
        case DISTORT          : vector = new Static3D( +x*mObjWidth/CORR, +y*mObjHeight/CORR, +z*mObjDepth/CORR);
211 211
                                effect = new VertexEffectDistort(   vector, center, mRegionV); break;
212 212
        case DEFORM           : vector = new Static3D( +x*mObjWidth/CORR, +y*mObjHeight/CORR, +z*mObjDepth/CORR);
213
                                effect = new VertexEffectDeform (   vector, center, mRegionV); break;
213
                                Static1D radius = new Static1D(mObjWidth/2);
214
                                effect = new VertexEffectDeform (   vector, radius, center, mRegionV); break;
214 215
        case SINK             : effect = new VertexEffectSink   (mStrength, center, mRegionV); break;
215 216
        case PINCH            : float lat = latitude>0 ? (float)(-Math.PI/2 + latitude) : (float)(Math.PI/2 + latitude);
216 217
                                float lon = longitude;

Also available in: Unified diff