bevy/examples/shader
Robert Swain 55da315432 bevy_render: Provide a way to opt-out of the built-in frustum culling (#3711)
# 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
2022-01-17 22:55:44 +00:00
..
animate_shader.rs add some more pipelined-rendering shader examples (#3041) 2022-01-05 19:43:11 +00:00
compute_shader_game_of_life.rs add some more pipelined-rendering shader examples (#3041) 2022-01-05 19:43:11 +00:00
shader_defs.rs make sub_app return an &App and add sub_app_mut() -> &mut App (#3309) 2021-12-24 06:57:30 +00:00
shader_instancing.rs bevy_render: Provide a way to opt-out of the built-in frustum culling (#3711) 2022-01-17 22:55:44 +00:00
shader_material_glsl.rs add some more pipelined-rendering shader examples (#3041) 2022-01-05 19:43:11 +00:00
shader_material.rs Materials and MaterialPlugin (#3428) 2021-12-25 21:45:43 +00:00