Edit shader live loop
edit_shader_live_loopUpdate GLSL shader source in a DAT, replace specific text, and get immediate error checks with an optional preview image to validate the visual result.
Instructions
Edit a GLSL/Text DAT and immediately run the practical shader feedback loop: write or surgically replace source text, inspect the shader/output node for errors, and optionally capture a compact inline preview. Uses set_dat_content/edit_dat_content under the hood so DAT write guardrails stay consistent.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | set overwrites the shader DAT; replace performs a surgical text replacement. | set |
| dat_path | Yes | Absolute path to the GLSL/Text DAT to edit. | |
| error_path | No | Node to inspect for errors after the edit. Defaults to preview_path, then dat_path. | |
| new_string | No | Replacement text. Required when mode is replace. | |
| old_string | No | Substring to find. Required when mode is replace. | |
| replace_all | No | For replace mode, replace all matches instead of requiring exactly one match. | |
| shader_code | No | Full shader source. Required when mode is set. | |
| jpeg_quality | No | JPEG quality. | |
| parent_depth | No | Upstream depth for inline-preview error inspection. | |
| preview_path | No | TOP path to preview after the shader edit, usually the GLSL TOP output or Null TOP. | |
| preview_width | No | Preview width. | |
| preview_format | No | Preview encoding. | jpeg |
| preview_height | No | Preview height. | |
| include_preview | No | Capture a compact inline preview after editing when preview_path is supplied. | |
| recursive_errors | No | If true, check errors recursively under error_path. |