Description
The FirstTexture
property of the Material
class provides access to the first texture associated with the material. This texture is typically used as the primary texture in rendering operations, and it can be utilized in various shader operations to achieve desired visual effects.
Usage
To access the FirstTexture
property, you need to have an instance of the Material
class. You can then get or set the FirstTexture
property to manipulate the primary texture of the material.
Example
// Assuming 'material' is an instance of Sandbox.Material
Sandbox.Texture primaryTexture = material.FirstTexture;
// To set a new texture
Sandbox.Texture newTexture = Texture.Load("path/to/texture");
material.FirstTexture = newTexture;