Writing a shader by hand

A material can name a .wgsl file (Inspector > Shader file, or NEW SHADER FILE which makes Shaders/<Material>.wgsl from a starter and opens it in the code editor). The file replaces the material's surface; it takes the node graph's place.

The file defines one function:

fn graph_surface(in: VsOut, v: vec3<f32>, base: Surface, tex: vec3<f32>, time: f32) -> Surface

Saving the file updates the material within a third of a second. A mistake is written to the Console with the file's own line and the material keeps its normal look. Helper functions may be added above graph_surface.