diff --git a/src/obj.c b/src/obj.c index 049a80d..d26fb61 100644 --- a/src/obj.c +++ b/src/obj.c @@ -347,8 +347,7 @@ internal void fill_triangle(Render *render, V3f vertices[TRIANGLE_VERTICES], } z = 0.0f; - z += vertices[0].z * coords.x + vertices[1].z * coords.y + - vertices[2].z * coords.z; + z += v0.z * coords.x + v1.z * coords.y + v2.z * coords.z; zbuf = get_pixel(f32, &(render->depth), x, y); if (z > zbuf) {