Skip to content

Conversation

@pcwalton
Copy link
Contributor

Currently, the specialize_prepass_material_meshes function adds meshes to the prepass unless both prepass_enabled and shadows_enabled are false for that material. This seems incorrect, as (1) the flags are separate for a reason and (2) meshes are added to the shadow pass not in specialize_prepass_material_meshes but in specialize_shadows.

This patch changes specialize_prepass_material_meshes to skip adding meshes to the prepass if prepass_enabled is false, even if shadows_enabled is true.

they have shadows enabled. Currently, the `specialize_prepass_material_meshes` function adds meshes to the prepass unless both `prepass_enabled` *and* `shadows_enabled` are false for that material. This seems incorrect, as (1) the flags are separate for a reason and (2) meshes are added to the shadow pass not in `specialize_prepass_material_meshes` but in `specialize_shadows`. This patch changes `specialize_prepass_material_meshes` to skip adding meshes to the prepass if `prepass_enabled` is false, even if `shadows_enabled` is true.
@pcwalton pcwalton requested a review from tychedelia November 28, 2025 00:28
Copy link
Contributor

@IceSentry IceSentry left a comment

Choose a reason for hiding this comment

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

A part of me is wondering if it should maybe be a || instead of completely removing it but it seemed to work fine in the couple of test I did and it make sense to always skip it when the prepass is enabled.

@IceSentry IceSentry added the A-Rendering Drawing game state to the screen label Nov 28, 2025
@alice-i-cecile alice-i-cecile added this to the 0.18 milestone Nov 28, 2025
@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Nov 28, 2025
@mockersf mockersf added this pull request to the merge queue Nov 28, 2025
Merged via the queue into bevyengine:main with commit df72a54 Nov 28, 2025
45 checks passed
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 D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward

4 participants