diff --git a/test.ps1bsp b/test.ps1bsp index bca53a5..3173adb 100755 Binary files a/test.ps1bsp and b/test.ps1bsp differ diff --git a/world.c b/world.c index 379a1c5..05dc884 100644 --- a/world.c +++ b/world.c @@ -231,6 +231,8 @@ static void world_drawface(const world_t *world, const ps1bsp_face_t *face) cam_vec.vz = center.vz - cam_pos.vz; const ps1bsp_plane_t *plane = &world->planes[face->planeId]; + // NOTE: this value could be REALLY useful for determining the tessellation subdivisions. It has camera distance *and* angle in it. + // Just include the face size/area for an approximate screen size. Maybe also separate x/y/z for angle-dependent tessellation. short dot = world_planeDot(&cam_vec, plane); if ((dot >= 0) ^ face->side) return; @@ -244,7 +246,7 @@ static void world_drawface(const world_t *world, const ps1bsp_face_t *face) { const ps1bsp_vertex_t *vert = &world->vertices[faceVertex->index]; vecs[vertIdx] = *((SVECTOR*)vert); - vecs[vertIdx].pad = vert->baseLight; + vecs[vertIdx].pad = faceVertex->light; } if (face->numFaceVertices == 3) // Special case: draw single triangles using the simplest method