Shader for use with voxel-mesher.
Based on @mikolalysenko's ao-shader
Requires voxel-stitch for textures,
game-shell-fps-camera for camera view matrix,
and indirectly voxel-mesher
through game.voxels.meshes
.
Load with voxel-plugins
Options:
perspectiveResize
: if true (default), listens forgl-resize
game-shell event and updates projection matrixcameraNear
,cameraFar
: camera near and far clipping planescameraFOV
: field of view in degrees (note: callupdateProjectionMatrix()
after changing any of the camera options, see camera-debug)
When the plugin is enabled, it will automatically listen for gl-init
and gl-render
events from game-shell, for initializing and rendering the scene.
Voxels are rendered in two passes, refer to the voxel-mesher documentation for further details.
#Credits (c) 2013 Mikola Lysenko, (c) 2014 deathcap. MIT License