Project

General

Profile

« Previous | Next » 

Revision 5fa528a6

Added by Leszek Koltunski over 4 years ago

Correct Inflate vectors in Triangles mesh

View differences:

src/main/java/org/distorted/library/mesh/MeshTriangles.java
43 43
     attribs1[VERT1_ATTRIBS*vertex + NOR_ATTRIB+2] = 1.0f;
44 44

  
45 45
     attribs1[VERT1_ATTRIBS*vertex + INF_ATTRIB  ] = (x-0.5f);
46
     attribs1[VERT1_ATTRIBS*vertex + INF_ATTRIB+1] = (y-0.5f);
46
     attribs1[VERT1_ATTRIBS*vertex + INF_ATTRIB+1] = (y-0.33f);
47 47
     attribs1[VERT1_ATTRIBS*vertex + INF_ATTRIB+2] = 0.01f   ;  // Inflated surface needs to be slightly in front
48 48

  
49 49
     attribs2[VERT2_ATTRIBS*vertex + TEX_ATTRIB  ] = x;

Also available in: Unified diff