Skip to content

Conversation

@pcwalton
Copy link
Contributor

@pcwalton pcwalton commented Feb 8, 2025

Right now, meshes aren't grouped together based on the bindless texture slab when drawing shadows. This manifests itself as flickering in Bistro. I believe that there are two causes of this:

  1. Alpha masked shadows may try to sample from the wrong texture, causing the alpha mask to appear and disappear.

  2. Objects may try to sample from the blank textures that we pad out the bindless slabs with, causing them to vanish intermittently.

This commit fixes the issue by including the material bind group ID as part of the shadow batch set key, just as we do for the prepass and main pass.

Right now, meshes aren't grouped together based on the bindless texture
slab when drawing shadows. This manifests itself as flickering in
Bistro. I believe that there are two causes of this:

1. Alpha masked shadows may try to sample from the wrong texture,
   causing the alpha mask to appear and disappear.

2. Objects may try to sample from the blank textures that we pad out the
   bindless slabs with, causing them to vanish intermittently.

This commit fixes the issue by including the material bind group ID as
part of the shadow batch set key, just as we do for the prepass and main
pass.
@pcwalton pcwalton added A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior P-Regression Functionality that used to work but no longer does. Add a test for this! S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Feb 8, 2025
@alice-i-cecile alice-i-cecile added this to the 0.16 milestone Feb 8, 2025
@superdump superdump added this pull request to the merge queue Feb 8, 2025
Merged via the queue into bevyengine:main with commit bcfc086 Feb 8, 2025
33 checks passed
mrchantey pushed a commit to mrchantey/bevy that referenced this pull request Feb 17, 2025
…ine#17738)

Right now, meshes aren't grouped together based on the bindless texture
slab when drawing shadows. This manifests itself as flickering in
Bistro. I believe that there are two causes of this:

1. Alpha masked shadows may try to sample from the wrong texture,
causing the alpha mask to appear and disappear.

2. Objects may try to sample from the blank textures that we pad out the
bindless slabs with, causing them to vanish intermittently.

This commit fixes the issue by including the material bind group ID as
part of the shadow batch set key, just as we do for the prepass and main
pass.
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 P-Regression Functionality that used to work but no longer does. Add a test for this! S-Needs-Review Needs reviewer attention (from anyone!) to move forward

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants