Project

General

Profile

Revision 5dadaecd

ID5dadaecdd567f39fcf54e243a7a1c60b9213002e
Parent 1418a5eb
Child 353f7580

Added by Leszek Koltunski 3 months ago

Fixes for some stuff discovered while making the Distort effect fully 3D:

- make MeshSphere's normal lengths be 1 (used to be 0.5)
- make the Effect3D app display precise values of the Center and Region vars.

View differences:

src/main/java/org/distorted/library/mesh/MeshSphere.java
194 194
    attribs[VERT_ATTRIBS*currentVert + POS_ATTRIB+1] = y;  //
195 195
    attribs[VERT_ATTRIBS*currentVert + POS_ATTRIB+2] = z;  //
196 196
                                                           //  In case of this Mesh so it happens that
197
    attribs[VERT_ATTRIBS*currentVert + NOR_ATTRIB  ] = x;  //  the vertex coords, normal vector, and
198
    attribs[VERT_ATTRIBS*currentVert + NOR_ATTRIB+1] = y;  //  inflate vector have identical (x,y,z).
199
    attribs[VERT_ATTRIBS*currentVert + NOR_ATTRIB+2] = z;  //
197
    attribs[VERT_ATTRIBS*currentVert + NOR_ATTRIB  ] = 2*x;//  the vertex coords, normal vector, and
198
    attribs[VERT_ATTRIBS*currentVert + NOR_ATTRIB+1] = 2*y;//  inflate vector have identical (x,y,z).
199
    attribs[VERT_ATTRIBS*currentVert + NOR_ATTRIB+2] = 2*z;//
200 200
                                                           //  TODO: think about some more efficient
201 201
    attribs[VERT_ATTRIBS*currentVert + INF_ATTRIB  ] = x;  //  representation.
202 202
    attribs[VERT_ATTRIBS*currentVert + INF_ATTRIB+1] = y;  //

Also available in: Unified diff