engineGetShaderParameters
Client
Lists the parameters a shader or preset declares.
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
for name, parameter in pairs(engineGetShaderParameters("surface")) do
outputDebugString(name .. ": " .. parameter.type)
endNoteA name that is neither a shader nor a preset is an error.