Project

General

Profile

« Previous | Next » 

Revision 0f10a0b6

Added by Leszek Koltunski about 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/library/effect/VertexEffectPinch.java
71 71
    {
72 72
    addEffect(EffectName.PINCH,
73 73

  
74
        "vec3 center = vUniforms[effect+1].yzw;              \n"
75
      + "vec3 ps = center-v;                                 \n"
74
        "vec3 ps = vUniforms[effect+1].yzw -v;               \n"
76 75
      + "float h         = vUniforms[effect].x;              \n"
77 76
      + "float latitude  = vUniforms[effect].y;              \n"
78 77
      + "float longitude = vUniforms[effect].z;              \n"
79
      + "float deg = degree(vUniforms[effect+2],center,ps);  \n"
78
      + "float deg = degree(vUniforms[effect+2],ps);         \n"
80 79
      + "float t = deg * (1.0-h)/max(1.0,h);                 \n"
81 80
      + "float sinLAT = sin(latitude);                       \n"
82 81
      + "float cosLAT = cos(latitude);                       \n"

Also available in: Unified diff