# Sandbox.Material

A material. Uses several [Sandbox.Texture](/api/Sandbox.Texture)s and a [Sandbox.Material.Shader](/api/Sandbox.Material/Shader) with specific settings for more interesting visual effects.

- Kind: class
- Namespace: `Sandbox`
- Assembly: `Sandbox.Engine`
- Inherits: [Sandbox.Resource](/api/Sandbox.Resource)
- Modifiers: sealed

## Properties

- [`Attributes`](/api/Sandbox.Material/Attributes): Access to all of the attributes of this material.
- [`FirstTexture`](/api/Sandbox.Material/FirstTexture): Get thje first texture assigned to this material, if any.
- [`Flags`](/api/Sandbox.Material/Flags): Access flags on this material, which usually hint about the contents. These are generally added by the shader procedurally - but developers can add these in material editor too.
- [`IsValid`](/api/Sandbox.Material/IsValid)
- [`Name`](/api/Sandbox.Material/Name): Name (or path) of the material.
- [`Shader`](/api/Sandbox.Material/Shader): Gets the material's shader
- [`ShaderName`](/api/Sandbox.Material/ShaderName): Gets the underlying shader name for this material.

## Methods

- [`Create`](/api/Sandbox.Material/Create): Create a new empty material at runtime.
- [`CreateCopy`](/api/Sandbox.Material/CreateCopy): Create a copy of this material
- [`FromShader`](/api/Sandbox.Material/FromShader): Get an empty material based on the specified shader. This will cache the material so that subsequent calls will return the same material.
- [`GetColor`](/api/Sandbox.Material/GetColor): Get Color parameter, by name
- [`GetFeature`](/api/Sandbox.Material/GetFeature): Get a feature flag on the material. This is usually used to enable/disable shader permutations.
- [`GetTexture`](/api/Sandbox.Material/GetTexture): Get texture parameter, by name
- [`GetVector4`](/api/Sandbox.Material/GetVector4): Get Vector4 parameter, by name
- [`Load`](/api/Sandbox.Material/Load): Load a material from disk. Has internal cache.
- [`LoadAsync`](/api/Sandbox.Material/LoadAsync): Load a material from disk. Has internal cache.
- [`Set`](/api/Sandbox.Material/Set): Overrides/Sets an Vector4 within the material
- [`SetFeature`](/api/Sandbox.Material/SetFeature): Set a feature flag on the material. This is usually used to enable/disable shader permutations. This is kind of a define, also known as a combo.
