Fix error in volumetric fog shader#16677
Merged
mockersf merged 1 commit intobevyengine:mainfrom Dec 6, 2024
Merged
Conversation
ecoskey
approved these changes
Dec 6, 2024
Contributor
ecoskey
left a comment
There was a problem hiding this comment.
LGTM! I didn't notice this change in the other PR, I'm glad we have a cleaner way to index clustered objects
alice-i-cecile
approved these changes
Dec 6, 2024
pcwalton
approved these changes
Dec 6, 2024
Contributor
pcwalton
left a comment
There was a problem hiding this comment.
Oops, sorry about that!
mockersf
approved these changes
Dec 6, 2024
ecoskey
pushed a commit
to ecoskey/bevy
that referenced
this pull request
Jan 6, 2025
# Objective Volumetric fog was broken by bevyengine#13746. Looks like this particular shader just got missed. I don't see any other instances of `unpack_offset_and_counts` in the codebase. ``` 2024-12-06T03:18:42.297494Z ERROR bevy_render::render_resource::pipeline_cache: failed to process shader: error: no definition in scope for identifier: 'bevy_pbr::clustered_forward::unpack_offset_and_counts' ┌─ crates/bevy_pbr/src/volumetric_fog/volumetric_fog.wgsl:312:29 │ 312 │ let offset_and_counts = bevy_pbr::clustered_forward::unpack_offset_and_counts(cluster_index); │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unknown identifier │ = no definition in scope for identifier: 'bevy_pbr::clustered_forward::unpack_offset_and_counts' ``` ## Solution Use `unpack_clusterable_object_index_ranges` to get the indices for point/spot lights. ## Testing `cargo run --example volumetric_fog` `cargo run --example fog_volumes` `cargo run --example scrolling_fog`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
Volumetric fog was broken by #13746.
Looks like this particular shader just got missed. I don't see any other instances of
unpack_offset_and_countsin the codebase.Solution
Use
unpack_clusterable_object_index_rangesto get the indices for point/spot lights.Testing
cargo run --example volumetric_fogcargo run --example fog_volumescargo run --example scrolling_fog