Commits

Cliff Biffle committed 8c83874

We no longer update the Z component of the renderer's ray field, relying exclusively on the depth texture.

  • Participants
  • Parent commits 01f2a79
  • Branches shaders

Comments (0)

Files changed (1)

File KVRenderer.m

   // Cast them rays
   for (int y = 0; y < 480 - 1; y++) {
     for (int x = 0; x < 640 - 1; x++, vidx++) {
-      rays[vidx].z = sample[vidx];
+      vec3f_t here = {
+        rays[vidx].x,
+        rays[vidx].y,
+        sample[vidx],
+      };
       vec3f_t right = {
         rays[vidx + 1].x,
         rays[vidx + 1].y,
         rays[vidx + 640].y,
         sample[vidx + 640],
       };
-      normals[vidx] = compute_normal(rays[vidx], down, right);
+      normals[vidx] = compute_normal(here, down, right);
     }
   }