Click or drag to resize
DigitalRuneNoiseHelperGetGrainTexture Method
Gets a grain texture.

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

Parameters

graphicsService
Type: DigitalRune.GraphicsIGraphicsService
The graphics service.
size
Type: SystemInt32
The width of the texture in pixels.

Return Value

Type: Texture2D
A grain texture.
Exceptions
ExceptionCondition
ArgumentNullExceptiongraphicsService is .
ArgumentOutOfRangeExceptionsize is less than 1.
Remarks
This method returns a quadratic RGBA texture that contains random color values. (For each pixel, each channel contains a random 8-bit value). This method will always return the same texture if it is called for the same GraphicsDevice and the same size.
See Also