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/check/CheckRenderer.java
66 66
    private DistortedScreen mScreen;
67 67
    private int mObjHeight, mObjWidth;
68 68
    private Static3D mScale, mSwirl1, mSwirl2, mDeform1, mDeform2;
69
    private Static1D mRadius;
69 70

  
70 71
///////////////////////////////////////////////////////////////////////////////////////////////////
71 72

  
......
88 89
      mDeform2= new Static3D(0,0,0);
89 90
      mScale  = new Static3D(1,1,1);
90 91

  
92
      mRadius = new Static1D(0);
93

  
91 94
      mEffects = new DistortedEffects();
92 95
      mEffects.apply(new MatrixEffectScale(mScale));
93 96

  
......
110 113
      dDeform.add(mDeform1);
111 114
      dDeform.add(mDeform2);
112 115

  
113
      if( !mEffects.apply( new VertexEffectDeform(dDeform,new Static3D(0,0,0)) ) )
116
      if( !mEffects.apply( new VertexEffectDeform(dDeform, mRadius, new Static3D(0,0,0)) ) )
114 117
        {
115 118
        Log.e("Check", "Failed to add Deform effect!");
116 119
        }
......
175 178
      mObjHeight = bitmap.getHeight();
176 179
      mObjWidth  = bitmap.getWidth();
177 180

  
181
      mRadius.set(mObjWidth/2);
182

  
178 183
      if( mTexture==null ) mTexture = new DistortedTexture();
179 184
      mTexture.setTexture(bitmap);
180 185

  

Also available in: Unified diff