Create GLSL material
create_glsl_materialGenerate a GLSL material from pixel/vertex/geometry shader sources. Sources are auto-wired to companion DATs. Returns material path, DAT paths, and warnings for missing declarations or sampler binding issues.
Instructions
Create a GLSL MAT under parent_path for custom-shaded geometry. The pixel/vertex/(optional) geometry shader source is placed in companion Text DATs (<name>_pix/_vert/_geo) and wired to the GLSL MAT's pixel/vertex/geometry parameters; numeric uniforms are best-effort bound on the Vectors sequence and samplers on the Samplers sequence. Pixel shader must declare out vec4 fragColor;. Returns the GLSL MAT path, the DAT paths, and warnings for known TD GLSL footguns (missing fragColor, F1/F2 preamble collision, undeclared uTime, sampler bindings needing manual wiring). Artist assigns the MAT to a Geometry COMP via its material par.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| parent_path | Yes | Parent COMP to create the GLSL MAT + DATs inside. | |
| name | No | Name for the GLSL MAT (default 'glsl_mat1'). | |
| pixel_shader | Yes | GLSL pixel/fragment shader source. Must declare `out vec4 fragColor;`. | |
| vertex_shader | No | Optional GLSL vertex shader source. | |
| geometry_shader | No | Optional GLSL geometry shader source. | |
| uniforms | No | Optional uniform declarations to best-effort bind on the GLSL MAT. | |
| glsl_version | No | GLSL Version par value. | 330 |
| two_sided | No | twoside par. | |
| lighting_space | No | lightingspace par. | world |