Commits

Cliff Biffle  committed 8dbd6f0

Data holes are now eliminated by the shaders: the vertex shader marks them with transparent alpha, and the fragment shader discards them. This mostly affects the point cloud renderer.

  • Participants
  • Parent commits c6d2d92
  • Branches shaders

Comments (0)

Files changed (2)

File kinect_project.vs

   // The normal was computed in Kinect-space.  Unproject it too.
   vec3 normal = kinect_unproject_normal(normalize(gl_Normal), gl_Vertex.xyz, vertex.xyz);
   
-  gl_FrontColor = light_vertex(normal);
+  if (vertex.z <= 0.) {
+    gl_FrontColor = vec4(0,0,0,0);
+  } else {
+    gl_FrontColor = light_vertex(normal);
+  }
 }
 void main() {
+  if (gl_Color.a == 0.) {
+    discard;
+  }
   gl_FragColor = gl_Color;
 }