Skip to content

Stop rendering escaped ANSI sequences in wesl errors - #25464

Open
dylansechet wants to merge 2 commits into
bevyengine:mainfrom
dylansechet:no_ansi_wesl_errors
Open

Stop rendering escaped ANSI sequences in wesl errors#25464
dylansechet wants to merge 2 commits into
bevyengine:mainfrom
dylansechet:no_ansi_wesl_errors

Conversation

@dylansechet

Copy link
Copy Markdown
Contributor

Objective

Wesl shaders print escaped ANSI sequences when hitting a shader processing error. The same bug used to be present for wgsl and had to be fixed in naga_oil (#21164).

ERROR bevy_render::render_resource::pipeline_cache: failed to process shader error:
\x1b[1m\x1b[91merror\x1b[0m\x1b[1m: cannot find declaration of `LayerLightingInput`\x1b[0m
  \x1b[1m\x1b[94m|\x1b[0m
  \x1b[1m\x1b[94m= \x1b[0m\x1b[1mnote\x1b[0m: in declaration of `compute_radiances` in bevy_pbr::light_probe::environment_map (embedded://bevy_pbr/light_probe/environment_map.wesl)

Solution

Same approach as for #21164, disable color rendering.

Testing

Loaded a shader with errors and the error log is readable now :)

@alice-i-cecile alice-i-cecile added this to the 0.20 milestone Aug 19, 2026
@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen C-Usability A targeted quality-of-life change that makes Bevy easier to use X-Uncontroversial This work is generally agreed upon D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward D-Shaders This code uses GPU shader languages labels Aug 19, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in Rendering Aug 19, 2026
@alice-i-cecile alice-i-cecile added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Aug 19, 2026
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-Usability A targeted quality-of-life change that makes Bevy easier to use D-Shaders This code uses GPU shader languages D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it X-Uncontroversial This work is generally agreed upon

Projects

Status: Needs SME Triage

Development

Successfully merging this pull request may close these issues.

4 participants