mirror of
https://github.com/bevyengine/bevy
synced 2025-02-17 06:28:34 +00:00
# Objective - Allow opting-out of the built-in frustum culling for cases where its behaviour would be incorrect - Make use of the this in the shader_instancing example that uses a custom instancing method. The built-in frustum culling breaks the custom instancing in the shader_instancing example if the camera is moved to: ```rust commands.spawn_bundle(PerspectiveCameraBundle { transform: Transform::from_xyz(12.0, 0.0, 15.0) .looking_at(Vec3::new(12.0, 0.0, 0.0), Vec3::Y), ..Default::default() }); ``` ...such that the Aabb of the cube Mesh that is at the origin goes completely out of view. This incorrectly (for the purpose of the custom instancing) culls the `Mesh` and so culls all instances even though some may be visible. ## Solution - Add a `NoFrustumCulling` marker component - Do not compute and add an `Aabb` to `Mesh` entities without an `Aabb` if they have a `NoFrustumCulling` marker component - Do not apply frustum culling to entities with the `NoFrustumCulling` marker component |
||
---|---|---|
.. | ||
bevy_app | ||
bevy_asset | ||
bevy_audio | ||
bevy_core | ||
bevy_core_pipeline | ||
bevy_crevice | ||
bevy_derive | ||
bevy_diagnostic | ||
bevy_dylib | ||
bevy_dynamic_plugin | ||
bevy_ecs | ||
bevy_ecs_compile_fail_tests | ||
bevy_gilrs | ||
bevy_gltf | ||
bevy_input | ||
bevy_internal | ||
bevy_log | ||
bevy_macro_utils | ||
bevy_math | ||
bevy_pbr | ||
bevy_reflect | ||
bevy_render | ||
bevy_scene | ||
bevy_sprite | ||
bevy_tasks | ||
bevy_text | ||
bevy_transform | ||
bevy_ui | ||
bevy_utils | ||
bevy_window | ||
bevy_winit |