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/movingeffects/MovingEffectsSurfaceView.java
66 66
    private int mCurrEffect;
67 67
    private int mSize1, mSize2;
68 68
    private Static3D mDeform;
69
    private Static1D mRadius;
69 70

  
70 71
    private MovingEffectsRenderer mRenderer;
71 72

  
......
88 89
      
89 90
      mCenter = new Dynamic3D(LOOP_TIME,0.0f);
90 91
      mDeform = new Static3D(0,0,0.15f);
92
      mRadius = new Static1D(0);
91 93

  
92 94
      if(!isInEditMode())
93 95
        {
......
103 105
        Static3D regionFrag = new Static3D(0.15f,0.15f,0.15f);
104 106
        Static4D regionVert = new Static4D(0,0,0,0.15f);
105 107

  
106
        mEffectDeform  = new VertexEffectDeform  ( mDeform          , mCenter, regionVert);
108
        mEffectDeform  = new VertexEffectDeform  ( mDeform          , mRadius, mCenter, regionVert);
107 109
        mEffectSink    = new VertexEffectSink    (new Static1D(10)  , mCenter, regionVert);
108 110
        mEffectSwirl   = new VertexEffectSwirl   (new Static1D(30)  , mCenter, regionVert);
109 111
        mEffectAlpha   = new FragmentEffectAlpha (new Static1D(0.5f), mCenter, regionFrag, true);
......
120 122
      mScrWidth  = width;
121 123
      mScrHeight = height;
122 124

  
125
      mRadius.set(max/2);
126

  
123 127
      mSize1 = max/200;
124 128
      mSize2 = max/80;
125 129
      }

Also available in: Unified diff