bevy/pipelined/bevy_render2/src
François a636145d90 Default image used in PipelinedSpriteBundle to be able to render without loading a texture (#3270)
# Objective

- Fix #3188 
- Allow creating a `PipelinedSpriteBundle` without an image, just a plain color

```rust
PipelinedSpriteBundle {
    sprite: Sprite {
        color: Color::rgba(0.8, 0.0, 0.0, 0.3),
        custom_size: Some(Vec2::new(500.0, 500.0)),
        ..Default::default()
    },
    ..Default::default()
}
```

## Solution

- The default impl for `Image` was creating a one pixel image with all values at `1`. I changed it to `255` as picking `1` for it doesn't really make sense, it should be either `0` or `255`
- I created a static handle and added the default image to the assets with this handle
- I changed the default impl for `PipelinedSpriteBundle` to use this handle
2021-12-07 01:13:55 +00:00
..
camera Merge New Renderer 2021-11-22 23:57:42 -08:00
color fix calls to as_rgba_linear (#3200) 2021-11-28 10:40:42 +00:00
mesh Fix clippy errors related to IntoIter::new (#3269) 2021-12-06 22:26:35 +00:00
primitives Merge New Renderer 2021-11-22 23:57:42 -08:00
render_graph Document the new pipelined renderer (#3094) 2021-11-16 03:37:48 +00:00
render_phase Merge New Renderer 2021-11-22 23:57:42 -08:00
render_resource bevy_render2: Add support for #else for shader defs (#3206) 2021-12-02 03:27:13 +00:00
renderer Document the new pipelined renderer (#3094) 2021-11-16 03:37:48 +00:00
texture Default image used in PipelinedSpriteBundle to be able to render without loading a texture (#3270) 2021-12-07 01:13:55 +00:00
view Merge New Renderer 2021-11-22 23:57:42 -08:00
lib.rs Shader Imports. Decouple Mesh logic from PBR (#3137) 2021-11-18 03:45:02 +00:00
render_asset.rs Sprite change image (#3207) 2021-12-01 23:09:31 +00:00
render_component.rs Implement iter() for mutable Queries (#2305) 2021-12-01 23:28:10 +00:00