Skip to content

Bloom doesn't render if other cameras don't have HDR #22000

@mentalrob

Description

@mentalrob

Bevy version and features

  • 0.17.3
  • serialize

If your bug is rendering-related, copy the adapter info that appears when you run Bevy.

` AdapterInfo { name: "NVIDIA GeForce RTX 2060", vendor: 4318, device: 7817, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "560.94", backend: Vulkan }`

What you did

In my game i have 3 cameras, one is rendering the world, other is rendering the view model and an ui camera. I added bloom to world camera and world camera started not rendering anything.

What went wrong

World camera stopped rendering after adding Bloom::NATURAL

Additional information

My camera setup:

    commands
        .spawn((
            Name::new("Player Camera"),
            ViewVisibility::default(),
            Visibility::default(),
            MainCamera, 
            AccumalatedCameraInput::default(),
            CameraRecoil::default(),
            Transform::from_xyz(0.0, 0.0, 0.0),
        ))
        .with_children(|parent| {
            parent.spawn((
                Camera3d::default(),
                Camera {
                    order: 0,
                    clear_color: ClearColorConfig::Default,
                    ..default()
                },
                RenderLayers::from_layers(&[LAYER_DEFAULT, LAYER_PARTICLES]),
                WorldCamera::default(),
                Bloom::NATURAL,
                Tonemapping::TonyMcMapface,
                Name::new("World Camera"),
            ));
            parent.spawn((
                Camera3d::default(),
                Camera {
                    order: 1,
                    ..default()
                },
                Projection::Perspective(PerspectiveProjection {
                    fov: 70.0_f32.to_radians(), // Wider FOV for viewmodel
                    ..default()
                }),
                ViewModelCamera,
                RenderLayers::from_layers(&[LAYER_VIEWMODEL, LAYER_PARTICLES]),
                Name::new("ViewModel Camera"),
            ));
        });

I fixed the issue adding Hdr::default( ) to other cameras, that fixed rendering problem but its unintuitive and not documented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-RenderingDrawing game state to the screenC-BugAn unexpected or incorrect behaviorD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesS-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