| NoiseHelperGetGrainTexture Method |
Gets a grain texture.
Namespace: DigitalRune.GraphicsAssembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax public static Texture2D GetGrainTexture(
IGraphicsService graphicsService,
int size
)
Public Shared Function GetGrainTexture (
graphicsService As IGraphicsService,
size As Integer
) As Texture2D
public:
static Texture2D^ GetGrainTexture(
IGraphicsService^ graphicsService,
int size
)
static member GetGrainTexture :
graphicsService : IGraphicsService *
size : int -> Texture2D
Parameters
- graphicsService
- Type: DigitalRune.GraphicsIGraphicsService
The graphics service. - size
- Type: SystemInt32
The width of the texture in pixels.
Return Value
Type:
Texture2DA grain texture.
Exceptions 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