# Sandbox.Material.FromShader

## Overload 1

```csharp
static Material FromShader(Shader shader)
```

Get an empty material based on the specified shader. This will cache the material so that subsequent calls
will return the same material.

### Parameters

- `shader` (`Shader`)

### Returns

`Material`

## Overload 2

```csharp
static Material FromShader(string path)
```

Get an empty material based on the specified shader. This will cache the material so that subsequent calls
will return the same material.

### Parameters

- `path` (`string`)

### Returns

`Material`

Declared in [Sandbox.Material](/api/Sandbox.Material).
Assembly: `Sandbox.Engine`.
