pub(crate) fn resolve_tex2d_sampler(
name: &str,
) -> (&'static str, &'static str, bool)Expand description
Resolve an MD2 sampler name to the (texture_binding, sampler_binding, recognised) triple the WGSL wrapper actually
exposes. recognised = true suppresses the /*was: …*/ debug
comment for bindings we routed deliberately (vs. the fallback case).
- Noise pack textures —
sampler_noise_lq/_mq/_hqroute onto the dedicated noise textures usingsampler_pw(point+wrap), matching MD2’s high-frequency sampling intent. - fw/fc/pw/pc variants of main —
sampler_fw_main,_fc_main,_pw_main,_pc_mainkeepsampler_main_texturebut switch the sampler to the matching filter × address mode. - Anything else — falls back to
(sampler_main_texture, sampler_main)so unknown / user-loaded sampler names still produce valid WGSL. The original name is kept in a trailing comment for debugging.