Exemplo n.º 1
0
 /// <summary>
 /// Constructs HeightMapBuilder and takes a height map in the form of a float array as input
 /// </summary>
 /// <param name="shader">The compute shader that has all the layer kernels</param>
 /// <param name="heightMap">The height map to use. Height map length must have a whole square root result</param>
 public HeightMapBuilder(ComputeShader shader, float[] heightMap) : this(shader, BufferUtils.CreateHeightBuffer(heightMap))
 {
 }
Exemplo n.º 2
0
 /// <summary>
 /// Constructs a new height map to texture layer based on a height map float array
 /// </summary>
 /// <param name="heightMap">The height map to use</param>
 public HeightMapToTexture(float[] heightMap) : this(BufferUtils.CreateHeightBuffer(heightMap))
 {
 }
Exemplo n.º 3
0
 /// <summary>
 /// Constructs HeightMapBuilder and creates a new height map buffer based on the given resolution
 /// </summary>
 /// <param name="shader">The compute shader that has all the layer kernels</param>
 /// <param name="resolution">Resolution for the new height map</param>
 public HeightMapBuilder(ComputeShader shader, int resolution) : this(shader, BufferUtils.CreateHeightBuffer(resolution))
 {
 }