Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgraded to bevy 0.14 #61

Merged
merged 10 commits into from
Aug 25, 2024
Merged
3 changes: 1 addition & 2 deletions examples/krypta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use bevy::render::texture::{ImageFilterMode, ImageSamplerDescriptor};
use bevy::render::view::RenderLayers;
use bevy::sprite::MaterialMesh2dBundle;
use bevy::window::PrimaryWindow;
use bevy_inspector_egui::quick::{ResourceInspectorPlugin, WorldInspectorPlugin};
use bevy_inspector_egui::quick::ResourceInspectorPlugin;
use bevy_magic_light_2d::prelude::*;
use rand::prelude::*;
use bevy_magic_light_2d::gi::render_layer::ALL_LAYERS;
Expand Down Expand Up @@ -52,7 +52,6 @@ fn main()
}),
BevyMagicLight2DPlugin,
ResourceInspectorPlugin::<BevyMagicLight2DSettings>::new(),
WorldInspectorPlugin::new(),
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed WorldInspectorPlugin for krypta again (I added it in the previous commit) because none of the examples have that one enabled by default

))
.insert_resource(BevyMagicLight2DSettings {
light_pass_params: LightPassParams {
Expand Down
6 changes: 3 additions & 3 deletions src/gi/pipeline_assets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ pub fn system_extract_pipeline_assets(
res_target_sizes: Extract<Res<ComputedTargetSizes>>,

query_lights: Extract<Query<(&GlobalTransform, &OmniLightSource2D, &InheritedVisibility)>>,
query_occluders: Extract<Query<(&LightOccluder2D, &GlobalTransform, &Transform, &InheritedVisibility, &ViewVisibility)>>,
query_occluders: Extract<Query<(&LightOccluder2D, &GlobalTransform, &Transform, &InheritedVisibility)>>,
query_camera: Extract<Query<(&Camera, &GlobalTransform), With<FloorCamera>>>,
query_masks: Extract<Query<(&GlobalTransform, &SkylightMask2D)>>,
query_skylight_light: Extract<Query<&SkylightLight2D>>,
Expand Down Expand Up @@ -132,8 +132,8 @@ pub fn system_extract_pipeline_assets(
let light_occluders = gpu_pipeline_assets.light_occluders.get_mut();
light_occluders.count = 0;
light_occluders.data.clear();
for (occluder, global_transform, transform, hviz, vviz) in query_occluders.iter() {
if hviz.get() && vviz.get() {
for (occluder, global_transform, transform, hviz) in query_occluders.iter() {
if hviz.get() {
light_occluders.count += 1;
light_occluders.data.push(GpuLightOccluder2D {
center: global_transform.translation().xy(),
Expand Down
Loading