Skip to content

Light Field

The Looking Glass outputs a horizontal-parallax-only light field image typically comprised of 45 views. The valid view cone is roughly 40° in total, which should be mirrored in your virtual camera setup. In the HoloPlay API, views are stored and transfered as one large texture called a quilt. The quilt is then blit to the screen through a post-process shader which interweaves the pixels from each view to create the final light field image. This section will address the properties and functions pertaining to that light field creation.

Light Field Shader and Calibration

Each Looking Glass has a unique calibration that is read over USB. Internally, the HoloPlay API reads the calibration and passes these values to the light field shader. This process all happens in hp_initialize(), so there is no need to manually set it up, but information about the functions called are included here anyway.


Name Type Description
hp_lightfieldShader unsigned int The shader program for drawing light field images to the Looking Glass
hp_blitShader unsigned int The shader program for copying views to the quilt
hp_VAO unsigned int The vertex array object used internally to blit to the quilt and screen
hp_VBO unsigned int The vertex buffer object used internally to blit to the quilt and screen
hp_FBO unsigned int The frame buffer object used internally to blit views to the quilt


Name Description
hp_loadCalibration Loads the calibration over USB and stores it internally. Note: this does not pass the calibration values to the light field shader
hp_loadLightfieldShaders Loads and compiles the light field shaders into hp_lightfieldShader program
hp_loadBlitShaders Loads and compiles the blit shaders into hp_blitShader program
hp_loadCalibrationIntoShader Takes the internally loaded calibration and passes the values to hp_lightfieldShader
hp_drawLightfield Uses the hp_lightfieldShader program, binds the hp_quiltTexture, and draws a fullscreen quad
hp_setupBuffers Creates hp_VAO, hp_VBO, and hp_FBO internally
hp_initialize Calls all the functions necessary to set up the HoloPlay API environment
hp_release Destroys / releases all buffers and objects creating during hp_initialize()