View source
shaders
  • Contributors
    1. Loading...
Author Commit Message Date Builds
Cliff Biffle
KVRenderer's point field now gets loaded into a static VBO once, rather than at every frame. On my machine, this takes the GL draw operation from ~3ms to ~700us.
Cliff Biffle
KVRenderer now defines an option for controlling texturing.
Cliff Biffle
Only bother uploading the camera color image if we're actually using it to texture anything. Slight performance win when viewing raw depth data (which is all the time right now, since texturing is broken).
Cliff Biffle
Rearranged GL init code in KVRenderer.
Cliff Biffle
Surface readings are now drawn as point sprites, scaled with both distance from the Kinect and distance from the eyepoint. (Scaling is slightly wrong, in that it doesn't consider true viewport size.)
Cliff Biffle
Refactored GL initialization, which has been kind of screwed up. The Renderer is now in charge of all of its vertex-shader mumbo-jumbo.
Cliff Biffle
Renamed and recommented the data structure holding the renderer's two-dimensional point field, which used to have something to do with raycasting, but totally doesn't now.
Cliff Biffle
Cleaned up an old residual glNormal3f call.
Cliff Biffle
KVRenderer no longer sends useless Z components to the GPU, reducing the size of the transfer by 33%. Actual render times decrease by roughly the same amount.
Cliff Biffle
Renamed some variables in the vertex shader: I had mis-named the values that result when we drop out of homogeneous space.
Cliff Biffle
Moved lighting into the fragment shaders...not that it makes a whole lot of difference at the moment, since I don't believe normals are actually being interpolated.
Cliff Biffle
Removed the last vestiges of CPU-side normal computation.
Cliff Biffle
Vertex shader now computes normals, which makes things much prettier.
Cliff Biffle
Fixed a loss-of-precision warning in KVRenderer.
Cliff Biffle
Un-projection is now a single matrix multiply on the GPU. Having re-learned matrix math, which I hadn't used since high school, I was able to rearrange all the linearization and projection calculations so that I could describe the process as a single multiply in homogeneous space. Unfortunately, this disables normal calculation for now -- and thus lighting. Will fix all this shortly.
Cliff Biffle
Removed variable point-size rendering (because it's wrong and I'm going to redo it) and color texturing (same reason).
Cliff Biffle
Fixed a bug in my raycasting. I was assuming a fixed angle change between adjacent rays, which is of course false -- rays toward the edge of the image will be nearer to the previous ray's angle. The net effect: the edges of the XY plane were being computed incorrectly. Usefully, doing things the right way eliminates some transcendentals and may be more efficient if I refactor things a bit.
Cliff Biffle
The vertex and fragment shaders didn't really need to be recorded in instance variables.
Cliff Biffle
CmdT can now toggle texturing again.
Cliff Biffle
Camera RGB image is now bound to texure unit 1.
Cliff Biffle
Added an (unused) binding for a color texture on unit 1.
Cliff Biffle
Renamed the depth texture in the vertex shader, and explicitly bound it to texture unit 0. This further illustrates the poor factoring of the current code.
Cliff Biffle
Reworked point scaling to give better continuity in the distance, where samples are sparse.
Cliff Biffle
Point size is now scaled with distance.
Cliff Biffle
Rearranged the shader copy build stage.
Cliff Biffle
We no longer update the Z component of the renderer's ray field, relying exclusively on the depth texture.
Cliff Biffle
Fixed normal projection to use the depth texture. The vertex shader worked fine with this bug, but only because we were passing it all the depths twice.
Cliff Biffle
Removed the old color-texture transform code in preparation for doing it the Right Way(tm).
Cliff Biffle
Removed triangulated and mesh rendering, in the interest of merely being a Kinect *viewer* and not inferring data where there isn't any.
Cliff Biffle
Removed the unused linearizationTable -- the shader doesn't need it. Might be worth building a 1D linearization texture later though.
Cliff Biffle
Removed the old KFKinect class, which hadn't been used in some time.
Cliff Biffle
Renamed KVDepthView's spaceModel property to renderer.
Cliff Biffle
Removed the KVSpaceModel protocol.
Cliff Biffle
Renamed KVRayFieldSpaceModel -> KVRenderer, now that it's looking like I won't have multiple implementations any time soon.
Cliff Biffle
The Kinect's depth field is now passed to the GPU as a texture, used by the vertex shader to reconstruct geometry. It's also being passed as vertices. One step at a time....
Cliff Biffle
KVSpaceModels now have a chance to perform initialization.
Cliff Biffle
Switched anaglyph rendering from a hackish "toe-in" projection to a proper frustrum-skewing projection. Looks much better now.
Cliff Biffle
Reworked the GL projection math to avoid the use of gluPerspective. (I need to be able to create skewed frustums to do proper anaglyph, so gluPerspective was cramping my style.)
Cliff Biffle
Pinch-zoom gestures now change the FOV (i.e. zoom) instead of changing camera.z (dollying).
Cliff Biffle
Moved the default camera the rest of the way to the origin, and updated the target so anaglyph still works.
Cliff Biffle
Reworked camera and frustum setup so that the default projection is basically the Kinect's optical projection. This makes better use of display area.
Cliff Biffle
Split the vertex shader up into multiple files.
Cliff Biffle
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.
Cliff Biffle
Added a rudimentary fragment shader.
Cliff Biffle
Factored shader loading code into a separate method, for when there are multiple shaders.
Cliff Biffle
Split the vertex shader out into a separate file and cleaned it up a little.
Cliff Biffle
Point rendering now passes a normal array to the card to support lighting calculations.
Cliff Biffle
Moved linearization onto the GPU. Now the CPU exclusively deals with values in camera-space, including when it computes normals. This improves surface reconstruction (by making the maximum Z-jump scale with distance). Performance seems somewhat improved, particularly on the triangle renderer. I'm not convinced that my method for projecting the normals out of camera-space is correct.
Cliff Biffle
Made a first crack at correcting the normals after projection.
Cliff Biffle
Moved lighting into the vertex shader. As of my previous commit lighting was simply broken -- now it is closer to functional, though the normals are not transformed with the vertices and thus tend to point toward the camera more than they should.
Cliff Biffle
Discovered another flavor of Xcode per-user settings file, and told hg to ignore it.
Cliff Biffle
Moved raycasting into a vertex shader. Substantially reduces CPU usage.