Revision 513b2e9c
Added by Leszek Koltunski almost 4 years ago
src/main/java/org/distorted/examples/differentbitmaps/DifferentBitmapsRenderer.java | ||
---|---|---|
69 | 69 |
Dynamic3D dDistort = new Dynamic3D(3000,0.0f); |
70 | 70 |
dDistort.add(new Static3D( 25,0,0)); |
71 | 71 |
dDistort.add(new Static3D(-25,0,0)); |
72 |
Static3D mPoint = new Static3D(0,-60,0); |
|
72 |
Static3D point = new Static3D(0,-60,0); |
|
73 |
Static4D region= new Static4D(0,0,0,300); |
|
73 | 74 |
|
74 | 75 |
mEffects = new DistortedEffects[NUM]; |
75 | 76 |
mEffects[0] = new DistortedEffects(); |
... | ... | |
78 | 79 |
|
79 | 80 |
// Add the effects only to the first queue - all VERTEX and FRAGMENT effects are shared! |
80 | 81 |
// (Matrix effect cannot be shared as we have to display each Texture in a different location) |
81 |
VertexEffectSink sink = new VertexEffectSink(new Static1D(8), mPoint, new Static4D(0,0,0,80));
|
|
82 |
VertexEffectDistort distort = new VertexEffectDistort(dDistort,mPoint);
|
|
82 |
VertexEffectSink sink = new VertexEffectSink(new Static1D(8), point, new Static4D(0,0,0,80));
|
|
83 |
VertexEffectDistort distort = new VertexEffectDistort(dDistort,point,region);
|
|
83 | 84 |
mEffects[0].apply(sink); // enlarge the nose |
84 | 85 |
mEffects[0].apply(distort); // keep moving the whole bitmap left and right. |
85 | 86 |
|
Also available in: Unified diff
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.