Skip to content
Lachlan McDonald edited this page May 11, 2022 · 28 revisions

The sand and sand2 shaders add a layer of voxels on top of voxels matching the selected colors.

sand will only add voxels when the adjacent voxels are one of the selected colors. Whereas, sand2 will add voxels if there are adjacent voxels of any color.

Parameters

Voxels are added on top of voxels matching the selected color. Voxels are added randomly and only added when the voxel beneath has adjacent voxels, creating the effect of a rough pile of sand. The number of adjacent neighbors affects the randomness, with a higher number of neighbors increasing the odds a voxel will be added.

Parameter Description
Mode Color mode (see below)
Threshold Skews how often sand is added. Values closer to 0 quickly create peaks, where as values closer to 100 will add many more voxels.

Mode

There are 3 distinct color modes for generating voxels, as outlined below:

Example of a 'Mode' value of 0 Example of a 'Mode' value of 1 Example of a 'Mode' value of 2
Mode: 0 Mode: 1 Mode: 2
The color is chosen at random from the selected colors. The color of each voxel depends on how many adjacent neighbours it has. Reverse of Mode 1.

Examples

Download

View the shaders below or download the latest release:

Clone this wiki locally