Skip to content

Fix shader compile errors in custom_stencil.wesl and specialized_mesh_pipeline.wesl - #25439

Open
beicause wants to merge 5 commits into
bevyengine:mainfrom
beicause:fix-shader-error-custom_stencil
Open

Fix shader compile errors in custom_stencil.wesl and specialized_mesh_pipeline.wesl#25439
beicause wants to merge 5 commits into
bevyengine:mainfrom
beicause:fix-shader-error-custom_stencil

Conversation

@beicause

@beicause beicause commented Aug 17, 2026

Copy link
Copy Markdown
Member

Objective

Fix shader compile errors in the custom_stencil.wesl and specialized_mesh_pipeline.wesl: mesh_uniform.aabb_center, mesh_uniform.aabb_half_extents do not exist.

Solution

Use mesh_functions::get_metadata instead.

Testing

Added compressed mesh to the custom_render_phase and specialized_mesh_pipeline examples and ran them.

@beicause beicause changed the title Fix a shader compile error in the custom_stencil.wesl Fix a shader compile error in the custom_stencil.wesl Aug 17, 2026
@beicause beicause added C-Bug An unexpected or incorrect behavior A-Rendering Drawing game state to the screen S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Aug 17, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in Rendering Aug 17, 2026
@beicause beicause added the C-Examples An addition or correction to our examples label Aug 17, 2026
@kfc35 kfc35 added the D-Straightforward Simple bug fixes and API improvements, docs, test and examples label Aug 18, 2026
@beicause beicause changed the title Fix a shader compile error in the custom_stencil.wesl Fix shader compile errors in custom_stencil.wesl and specialized_mesh_pipeline.wesl Aug 18, 2026
@alice-i-cecile alice-i-cecile added this to the 0.20 milestone Aug 20, 2026
Comment thread assets/shaders/specialized_mesh_pipeline.wesl Outdated
Comment thread assets/shaders/specialized_mesh_pipeline.wesl Outdated
Comment thread assets/shaders/specialized_mesh_pipeline.wesl
.with_removed_attribute(Mesh::ATTRIBUTE_NORMAL)
.with_removed_attribute(Mesh::ATTRIBUTE_UV_0)
.compressed_mesh(
MeshAttributeCompressionFlags::all()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why .with_color(MeshAttributeCompressionFlags::COMPRESS_COLOR_UNORM8), when it has no color attribute?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Color float16 and unorm8 are mutually exclusive bit flags so MeshAttributeCompressionFlags::all() is a footgun that constructs an invalid color bit field (#24572 will address it). Though without the vertex color the flags are unused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior C-Examples An addition or correction to our examples D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward

Projects

Status: Needs SME Triage

Development

Successfully merging this pull request may close these issues.

4 participants