Click or drag to resize
DigitalRuneNoiseHelperGetNoiseTexture Method (IGraphicsService, Int32, Int32)
Gets a tileable noise texture.

Namespace: DigitalRune.Graphics
Assembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax
public static Texture2D GetNoiseTexture(
	IGraphicsService graphicsService,
	int size,
	int numberOfOscillations
)

Parameters

graphicsService
Type: DigitalRune.GraphicsIGraphicsService
The graphics service.
size
Type: SystemInt32
The width of the quadratic texture in pixels.
numberOfOscillations
Type: SystemInt32
Defines the scale/detail of the noise. The noise changes smoothly from dark to light and back, like a sine function. This value defines the max. number of such oscillations. For example, if this value is 10, then the noise texture will contain 5 to 10 oscillations.

Return Value

Type: Texture2D
A texture containing Perlin noise.
Exceptions
ExceptionCondition
ArgumentNullExceptiongraphicsService is .
ArgumentOutOfRangeExceptionsize or numberOfOscillations is less than 1.
Remarks
This method returns a quadratic RGBA texture that contains noise. Each channel contains a different 8-bit noise value, i.e. the texture contains 4 different Perlin noise images.
See Also