A couple small random tweaks while I play with lighting

This commit is contained in:
Eryn Wells 2018-11-22 08:12:15 -07:00
parent 30d7386805
commit 65ffec18e9
3 changed files with 3 additions and 3 deletions

View file

@ -47,7 +47,7 @@ kernel void updateGeometryNormals(constant packed_float3 *meshPositions [[buffer
float3 side2 = v1 - v3;
float3 normal = normalize(cross(side1, side2));
faceNormals[tid] = normal;
faceMidpoints[tid] = 0.3333333333 * (v1 + v2 + v3);
faceMidpoints[tid] = (1.0 / 3.0) * (v1 + v2 + v3);
}
kernel void updateGeometryVertexNormals()