# engineGetMaterialShader (Client)

> Gives the shader a material uses.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Client
- **Category**: Materials and shaders
- **URL**: https://wiki.mymp.gg/en/engineGetMaterialShader

## Syntax

```lua
string|false engineGetMaterialShader(material material)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `material` | `material` | The material. |

## Returns

The shader's name, or `false` when the material has neither a base nor a shader of its own and uses the one of the material it replaces.

## Example

```lua
local material = engineCreateMaterial("surface")
outputDebugString(tostring(engineGetMaterialShader(material)))
```

## See also

- [engineSetMaterialShader (Client)](https://wiki.mymp.gg/en/engineSetMaterialShader.md): Changes a material's shader, keeping the values it already has.
- [engineCreateMaterial (Client)](https://wiki.mymp.gg/en/engineCreateMaterial.md): Creates a material: a shader with parameter values, which then replaces or overlays the materials of models.
