Skip to content

scene_viewer example prints warnings after toggling shadow on and off #15897

@akimakinai

Description

@akimakinai

Bevy version

main

This does not reproduce with v0.14.2.

What you did

  • Run scene_viewer example and toggle shadow on and off (press U)

What went wrong

No visual problem, but this warning appears repeatedly in terminal:
WARN bevy_pbr::render::gpu_preprocess: The preprocessing index buffer wasn't present

Additional information

if !view_layers.intersects(&light.render_layers) {
gpu_light.skip = 1u32;
continue;
}
// Only deal with cascades when shadows are enabled.
if (gpu_light.flags & DirectionalLightFlags::SHADOWS_ENABLED.bits()) == 0u32 {
continue;
}

Hitting these conditions cause living (due to now retained render world) entitiy to be removed from live_shadow_mapping_lights in this function, hence removed from ViewBinnedRenderPhases, and later disagrees with query result in GpuPreprocessNode::run.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-RenderingDrawing game state to the screenC-BugAn unexpected or incorrect behaviorC-ExamplesAn addition or correction to our examplesD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesP-RegressionFunctionality that used to work but no longer does. Add a test for this!S-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions