| TerrainHelperSmoothTexture Method (Single, Int32, Int32, Single) |
Smooths the texture.
Namespace: DigitalRune.GraphicsAssembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax public static void SmoothTexture(
float[] data,
int textureWidth,
int textureHeight,
float smoothness
)
Public Shared Sub SmoothTexture (
data As Single(),
textureWidth As Integer,
textureHeight As Integer,
smoothness As Single
)
public:
static void SmoothTexture(
array<float>^ data,
int textureWidth,
int textureHeight,
float smoothness
)
static member SmoothTexture :
data : float32[] *
textureWidth : int *
textureHeight : int *
smoothness : float32 -> unit
Parameters
- data
- Type: SystemSingle
The texture data of mipmap level 0. - textureWidth
- Type: SystemInt32
The width of the texture. - textureHeight
- Type: SystemInt32
The height of the texture. - smoothness
- Type: SystemSingle
The smoothness: 0 means no smoothing. Values greater than 0 means more smoothing.
Exceptions Remarks
Use this method if the height map was loaded from an 8-bit image. 8-bit values are usually
insufficient to represent smooth surfaces. This method removes non-smooth terrain parts
caused by 8-bit quantization.
See Also