pub fn translate_shader_with_plan(
hlsl: &str,
plan: &TextureBindingPlan,
) -> Result<String>Expand description
Same as translate_shader, but routes unrecognised tex2D sampler names
through the supplied TextureBindingPlan. Preset authors reference
disk-loaded textures via sampler sampler_<NAME>; + tex2D(sampler_<NAME>, uv); the renderer scans the HLSL, builds a plan that resolves each name to
a slot in the comp pipeline’s user-texture binding array, and threads it
through here so the emitted WGSL points at the right binding.
Empty plan ≡ legacy behaviour: unrecognised samplers fall back to
sampler_main with a /*was: <name>*/ debug comment.