Skip to content

Instantly share code, notes, and snippets.

@ChristopherBiscardi
Last active September 15, 2025 03:36
Show Gist options
  • Select an option

  • Save ChristopherBiscardi/61272558b34b782df59d2d592a58d75e to your computer and use it in GitHub Desktop.

Select an option

Save ChristopherBiscardi/61272558b34b782df59d2d592a58d75e to your computer and use it in GitHub Desktop.

Revisions

  1. ChristopherBiscardi revised this gist Sep 15, 2025. 1 changed file with 15 additions and 0 deletions.
    15 changes: 15 additions & 0 deletions specialize.rs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    fn specialize(
    pipeline: &MaterialPipeline,
    descriptor: &mut RenderPipelineDescriptor,
    _layout: &MeshVertexBufferLayoutRef,
    _key: MaterialPipelineKey<Self>,
    ) -> Result<(), SpecializedMeshPipelineError> {
    info!(?descriptor.label);

    if let Some(frag_descriptor) = &descriptor.fragment
    {
    info!(?descriptor.label, ?frag_descriptor.shader_defs);
    }

    Ok(())
    }
  2. ChristopherBiscardi revised this gist Sep 15, 2025. 1 changed file with 6 additions and 10 deletions.
    16 changes: 6 additions & 10 deletions output.txt
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,6 @@
    2025-09-15T03:28:35.162833Z INFO prepass_extension: descriptor.label=Some("prepass_pipeline")
    2025-09-15T03:28:35.162853Z INFO prepass_extension: frag_descriptor exists! descriptor.label=Some("prepass_pipeline")
    2025-09-15T03:28:35.162833Z WARN bevy_pbr::render::mesh_view_bindings: Too many textures in mesh pipeline view layout, this might cause us to hit `wgpu::Limits::max_sampled_textures_per_shader_stage` in some environments.
    2025-09-15T03:28:35.162873Z INFO prepass_extension: descriptor.label=Some("opaque_mesh_pipeline")
    2025-09-15T03:28:35.162877Z INFO prepass_extension: frag_descriptor exists! descriptor.label=Some("opaque_mesh_pipeline")
    2025-09-15T03:28:35.162857Z INFO prepass_extension: descriptor.label=Some("prepass_pipeline") frag_descriptor.shader_defs=[Bool("PREPASS_PIPELINE", true), UInt("MATERIAL_BIND_GROUP", 3), Bool("VERTEX_OUTPUT_INSTANCE_INDEX", true), Bool("DEPTH_PREPASS", true), Bool("MAY_DISCARD", true), Bool("VERTEX_POSITIONS", true), Bool("VERTEX_UVS", true), Bool("VERTEX_UVS_A", true), Bool("NORMAL_PREPASS", true), Bool("NORMAL_PREPASS_OR_DEFERRED_PREPASS", true), Bool("VERTEX_NORMALS", true), Bool("MOTION_VECTOR_PREPASS_OR_DEFERRED_PREPASS", true), Bool("MOTION_VECTOR_PREPASS", true), Bool("MULTIPLE_LIGHTMAPS_IN_ARRAY", true), Bool("PREPASS_FRAGMENT", true)]
    2025-09-15T03:28:35.162879Z INFO prepass_extension: descriptor.label=Some("opaque_mesh_pipeline") frag_descriptor.shader_defs=[Bool("MESH_PIPELINE", true), Bool("VERTEX_OUTPUT_INSTANCE_INDEX", true), Bool("VERTEX_POSITIONS", true), Bool("VERTEX_NORMALS", true), Bool("VERTEX_UVS", true), Bool("VERTEX_UVS_A", true), Bool("MULTISAMPLED", true), Bool("NORMAL_PREPASS", true), Bool("DEPTH_PREPASS", true), Bool("MOTION_VECTOR_PREPASS", true), Bool("VIEW_PROJECTION_PERSPECTIVE", true), Bool("TONEMAP_IN_SHADER", true), UInt("TONEMAPPING_LUT_TEXTURE_BINDING_INDEX", 18), UInt("TONEMAPPING_LUT_SAMPLER_BINDING_INDEX", 19), Bool("TONEMAP_METHOD_TONY_MC_MAPFACE", true), Bool("DEBAND_DITHER", true), Bool("MAY_DISCARD", true), Bool("SHADOW_FILTER_METHOD_GAUSSIAN", true), Int("SCREEN_SPACE_SPECULAR_TRANSMISSION_BLUR_TAPS", 8), Bool("MULTIPLE_LIGHT_PROBES_IN_ARRAY", true), Bool("MULTIPLE_LIGHTMAPS_IN_ARRAY", true), Bool("IRRADIANCE_VOLUMES_ARE_USABLE", true), UInt("MATERIAL_BIND_GROUP", 3)]
    2025-09-15T03:28:35.241205Z INFO prepass_extension: descriptor.label=Some("prepass_pipeline")
    2025-09-15T03:28:35.241218Z INFO prepass_extension: frag_descriptor exists! descriptor.label=Some("prepass_pipeline")
    2025-09-15T03:28:35.241220Z INFO prepass_extension: descriptor.label=Some("prepass_pipeline") frag_descriptor.shader_defs=[Bool("PREPASS_PIPELINE", true), UInt("MATERIAL_BIND_GROUP", 3), Bool("VERTEX_OUTPUT_INSTANCE_INDEX", true), Bool("DEPTH_PREPASS", true), Bool("MAY_DISCARD", true), Bool("VERTEX_POSITIONS", true), Bool("VERTEX_UVS", true), Bool("VERTEX_UVS_A", true), Bool("MULTIPLE_LIGHTMAPS_IN_ARRAY", true)]
    2025-09-15T03:33:15.025472Z INFO prepass_extension: descriptor.label=Some("prepass_pipeline")
    2025-09-15T03:33:15.025493Z INFO prepass_extension: descriptor.label=Some("opaque_mesh_pipeline")
    2025-09-15T03:33:15.025507Z INFO prepass_extension: descriptor.label=Some("opaque_mesh_pipeline") frag_descriptor.shader_defs=[Bool("MESH_PIPELINE", true), Bool("VERTEX_OUTPUT_INSTANCE_INDEX", true), Bool("VERTEX_POSITIONS", true), Bool("VERTEX_NORMALS", true), Bool("VERTEX_UVS", true), Bool("VERTEX_UVS_A", true), Bool("MULTISAMPLED", true), Bool("NORMAL_PREPASS", true), Bool("DEPTH_PREPASS", true), Bool("MOTION_VECTOR_PREPASS", true), Bool("VIEW_PROJECTION_PERSPECTIVE", true), Bool("TONEMAP_IN_SHADER", true), UInt("TONEMAPPING_LUT_TEXTURE_BINDING_INDEX", 18), UInt("TONEMAPPING_LUT_SAMPLER_BINDING_INDEX", 19), Bool("TONEMAP_METHOD_TONY_MC_MAPFACE", true), Bool("DEBAND_DITHER", true), Bool("MAY_DISCARD", true), Bool("SHADOW_FILTER_METHOD_GAUSSIAN", true), Int("SCREEN_SPACE_SPECULAR_TRANSMISSION_BLUR_TAPS", 8), Bool("MULTIPLE_LIGHT_PROBES_IN_ARRAY", true), Bool("MULTIPLE_LIGHTMAPS_IN_ARRAY", true), Bool("IRRADIANCE_VOLUMES_ARE_USABLE", true), UInt("MATERIAL_BIND_GROUP", 3)]
    2025-09-15T03:33:15.025501Z INFO prepass_extension: descriptor.label=Some("prepass_pipeline") frag_descriptor.shader_defs=[Bool("PREPASS_PIPELINE", true), UInt("MATERIAL_BIND_GROUP", 3), Bool("VERTEX_OUTPUT_INSTANCE_INDEX", true), Bool("DEPTH_PREPASS", true), Bool("MAY_DISCARD", true), Bool("VERTEX_POSITIONS", true), Bool("VERTEX_UVS", true), Bool("VERTEX_UVS_A", true), Bool("NORMAL_PREPASS", true), Bool("NORMAL_PREPASS_OR_DEFERRED_PREPASS", true), Bool("VERTEX_NORMALS", true), Bool("MOTION_VECTOR_PREPASS_OR_DEFERRED_PREPASS", true), Bool("MOTION_VECTOR_PREPASS", true), Bool("MULTIPLE_LIGHTMAPS_IN_ARRAY", true), Bool("PREPASS_FRAGMENT", true)]
    2025-09-15T03:33:15.143593Z INFO prepass_extension: descriptor.label=Some("prepass_pipeline")
    2025-09-15T03:33:15.143610Z INFO prepass_extension: descriptor.label=Some("prepass_pipeline") frag_descriptor.shader_defs=[Bool("PREPASS_PIPELINE", true), UInt("MATERIAL_BIND_GROUP", 3), Bool("VERTEX_OUTPUT_INSTANCE_INDEX", true), Bool("DEPTH_PREPASS", true), Bool("MAY_DISCARD", true), Bool("VERTEX_POSITIONS", true), Bool("VERTEX_UVS", true), Bool("VERTEX_UVS_A", true), Bool("MULTIPLE_LIGHTMAPS_IN_ARRAY", true)]
  3. ChristopherBiscardi created this gist Sep 15, 2025.
    10 changes: 10 additions & 0 deletions output.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    2025-09-15T03:28:35.162833Z INFO prepass_extension: descriptor.label=Some("prepass_pipeline")
    2025-09-15T03:28:35.162853Z INFO prepass_extension: frag_descriptor exists! descriptor.label=Some("prepass_pipeline")
    2025-09-15T03:28:35.162833Z WARN bevy_pbr::render::mesh_view_bindings: Too many textures in mesh pipeline view layout, this might cause us to hit `wgpu::Limits::max_sampled_textures_per_shader_stage` in some environments.
    2025-09-15T03:28:35.162873Z INFO prepass_extension: descriptor.label=Some("opaque_mesh_pipeline")
    2025-09-15T03:28:35.162877Z INFO prepass_extension: frag_descriptor exists! descriptor.label=Some("opaque_mesh_pipeline")
    2025-09-15T03:28:35.162857Z INFO prepass_extension: descriptor.label=Some("prepass_pipeline") frag_descriptor.shader_defs=[Bool("PREPASS_PIPELINE", true), UInt("MATERIAL_BIND_GROUP", 3), Bool("VERTEX_OUTPUT_INSTANCE_INDEX", true), Bool("DEPTH_PREPASS", true), Bool("MAY_DISCARD", true), Bool("VERTEX_POSITIONS", true), Bool("VERTEX_UVS", true), Bool("VERTEX_UVS_A", true), Bool("NORMAL_PREPASS", true), Bool("NORMAL_PREPASS_OR_DEFERRED_PREPASS", true), Bool("VERTEX_NORMALS", true), Bool("MOTION_VECTOR_PREPASS_OR_DEFERRED_PREPASS", true), Bool("MOTION_VECTOR_PREPASS", true), Bool("MULTIPLE_LIGHTMAPS_IN_ARRAY", true), Bool("PREPASS_FRAGMENT", true)]
    2025-09-15T03:28:35.162879Z INFO prepass_extension: descriptor.label=Some("opaque_mesh_pipeline") frag_descriptor.shader_defs=[Bool("MESH_PIPELINE", true), Bool("VERTEX_OUTPUT_INSTANCE_INDEX", true), Bool("VERTEX_POSITIONS", true), Bool("VERTEX_NORMALS", true), Bool("VERTEX_UVS", true), Bool("VERTEX_UVS_A", true), Bool("MULTISAMPLED", true), Bool("NORMAL_PREPASS", true), Bool("DEPTH_PREPASS", true), Bool("MOTION_VECTOR_PREPASS", true), Bool("VIEW_PROJECTION_PERSPECTIVE", true), Bool("TONEMAP_IN_SHADER", true), UInt("TONEMAPPING_LUT_TEXTURE_BINDING_INDEX", 18), UInt("TONEMAPPING_LUT_SAMPLER_BINDING_INDEX", 19), Bool("TONEMAP_METHOD_TONY_MC_MAPFACE", true), Bool("DEBAND_DITHER", true), Bool("MAY_DISCARD", true), Bool("SHADOW_FILTER_METHOD_GAUSSIAN", true), Int("SCREEN_SPACE_SPECULAR_TRANSMISSION_BLUR_TAPS", 8), Bool("MULTIPLE_LIGHT_PROBES_IN_ARRAY", true), Bool("MULTIPLE_LIGHTMAPS_IN_ARRAY", true), Bool("IRRADIANCE_VOLUMES_ARE_USABLE", true), UInt("MATERIAL_BIND_GROUP", 3)]
    2025-09-15T03:28:35.241205Z INFO prepass_extension: descriptor.label=Some("prepass_pipeline")
    2025-09-15T03:28:35.241218Z INFO prepass_extension: frag_descriptor exists! descriptor.label=Some("prepass_pipeline")
    2025-09-15T03:28:35.241220Z INFO prepass_extension: descriptor.label=Some("prepass_pipeline") frag_descriptor.shader_defs=[Bool("PREPASS_PIPELINE", true), UInt("MATERIAL_BIND_GROUP", 3), Bool("VERTEX_OUTPUT_INSTANCE_INDEX", true), Bool("DEPTH_PREPASS", true), Bool("MAY_DISCARD", true), Bool("VERTEX_POSITIONS", true), Bool("VERTEX_UVS", true), Bool("VERTEX_UVS_A", true), Bool("MULTIPLE_LIGHTMAPS_IN_ARRAY", true)]