pub(crate) fn build_user_shader_bind_group_layout(
device: &Device,
label: &str,
) -> BindGroupLayoutExpand description
Build one of the four MD2 sampler variants used by sampler_{fw,fc,pw,pc}.
MD2 encodes the choice into the sampler name: f/p = filter mode
(filtered=linear vs point=nearest), w/c = address mode (wrap vs
clamp-to-edge). Real preset authoring intent is matched per call site
(sampler_pw_main = high-frequency point sample wrapped to texture
boundary; sampler_fc_main = smooth bilinear sample clamped at edges).
Build the bind-group layout user-translated shaders bind against.
Single source of truth for the 25 entries the codegen wrapper assumes:
ShaderUniforms at binding(0), sampler_main_texture + sampler at
1/2, blur1/2/3 at 3/4/5, noise pack at 6..10, MD2 sampler variants at
11..14, eight user-texture slots at 15..22, and prev_main at 23.
Both CompPipeline (default + user comp shaders) and the warp
pipeline’s user-shader path call this so a future binding tweak only
needs to land here.