AdvancedBuilds the quad and the shader that reads options.texture
Options for the viewer
StaticdefaultDefaults for every new DepthMapViewer; an option passed as undefined keeps its default
Destroys the viewer and the quad and shader it built
As on any pixi Mesh, the viewed texture is destroyed only when options asks for it, and
destroy(true) destroys its source as well, so call destroy() when viewing a live shadow map.
Optionaloptions: DestroyOptions
Destroy options, as for pixi's Mesh.destroy
Frees the quad's GPU buffers; the next render uploads them again
The shader holds no GPU memory of its own, since pixi caches compiled programs.
Debug quad that shows a depth array texture in greyscale
Shows the first four layers in a 2×2 grid: layer 0 top-left, 1 top-right, 2 bottom-left and 3 bottom-right. Add it to the stage like any 2D mesh while debugging, then remove it.