td_glsl
Read or write GLSL shader code for a GLSL TOP/MAT/POP by resolving the docked DAT. Returns code, compile errors, and stage details.
Instructions
Read or write a GLSL shader stage, resolving the correct docked DAT.
A GLSL TOP keeps its source in _pixel_shader / _vertex_shader
DATs docked to the parent — never guess that DAT's name or set .text
on it directly. Omit code to read; pass code to write (set
return_compiled=true to re-cook and surface compile errors). Returns
{stage, docked_dat_path, code, errors}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | If provided, write into the docked DAT; if omitted, read instead. | |
| path | Yes | GLSL TOP/MAT/POP path (e.g. '/project1/glsl1'). | |
| stage | No | Shader stage: 'pixel', 'vertex', or 'compute'. | pixel |
| response_format | No | Output format: 'json' (default) or 'markdown'. | json |
| return_compiled | No | On write, re-cook and return any compile errors. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |