Revision 513b2e9c
Added by Leszek Koltunski almost 4 years ago
src/main/java/org/distorted/examples/differenteffects/DifferentEffectsRenderer.java | ||
---|---|---|
70 | 70 |
// mEffects[0] effects |
71 | 71 |
Static3D pLeft = new Static3D(214 - 594/2, 394 - 600/2, 0); |
72 | 72 |
Static3D pRight= new Static3D(390 - 594/2, 388 - 600/2, 0); |
73 |
Static4D RegionEye = new Static4D(0,0,0,60); |
|
74 |
|
|
73 |
Static4D RegionEye = new Static4D(0,0,0, 60); |
|
74 |
Static4D RegionCen = new Static4D(0,0,0,300); |
|
75 |
|
|
75 | 76 |
// mEffects[1] effects |
76 | 77 |
Dynamic3D dyn = new Dynamic3D(1000,0.0f); |
77 | 78 |
dyn.add(new Static3D( 50,0,0)); |
... | ... | |
90 | 91 |
|
91 | 92 |
VertexEffectSink sinkL = new VertexEffectSink(sink, pLeft , RegionEye); |
92 | 93 |
VertexEffectSink sinkR = new VertexEffectSink(sink, pRight, RegionEye); |
93 |
VertexEffectDistort distort = new VertexEffectDistort(dyn,pNose1); |
|
94 |
VertexEffectDistort distort = new VertexEffectDistort(dyn,pNose1, RegionCen);
|
|
94 | 95 |
|
95 | 96 |
mEffects[0].apply(sinkL); |
96 | 97 |
mEffects[0].apply(sinkR); |
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.