# engineGetShaderParameters (Client)

> Lists the parameters a shader or preset declares.

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

## Syntax

```lua
table engineGetShaderParameters(string|shader shader)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `shader` | `string\|shader` | The name of a shader or preset, or a `shader` element. |

## Returns

A table of name → `{ type, default }`. `type` is `texture`, `float`, `vec2`, `vec3`, `vec4` or `uint`. A texture also has `colorSpace` (`color`, `non_color` or `normal`), and a parameter fed by another has `from`. Static switches show as `type` `bool` with `switch` `true`, and each `TARGET_1`… output as `type` `target`.

## Example

```lua
for name, parameter in pairs(engineGetShaderParameters("surface")) do
    outputDebugString(name .. ": " .. parameter.type)
end
```

### Note

A name that is neither a shader nor a preset is an error.

## See also

- [engineGetMaterialParameters (Client)](https://wiki.mymp.gg/en/engineGetMaterialParameters.md): Lists the parameters of the shader a material uses.
- [engineGetShaderSwitches (Client)](https://wiki.mymp.gg/en/engineGetShaderSwitches.md): Lists the static switches (bool parameters) of a shader or preset, with each one's default.
- [engineSetMaterialValue (Client)](https://wiki.mymp.gg/en/engineSetMaterialValue.md): Sets a material's value: a shader parameter, a static switch or the render target of a TARGET_n output.
