bevy/crates
François 07cf088f33 fix memory size for PointLightBundle (#1940)
Introduced in #1778, not fixed by #1931 

The size of `Lights` buffer currently is : 
```rust
    16 // (color, `[f32; 4]`)
    + 16 // (number of lights, `f32` encoded as a `[f32; 4]`)
    + 10 // (maximum number of lights)
        * ( 16 // (light position, `[f32; 4]`
          + 16 // (color, `[16; 4]`)
          + 4 // (inverse_range_squared, `f32`)
          )

-> 392
```

This makes the pbr shader crash when running with Xcode debugger or with the WebGL2 backend. They both expect a buffer sized 512. This can also be seen on desktop by adding a second light to a scene with a color, it's position and color will be wrong.

adding a second light to example `load_gltf`:
```rust
    commands
        .spawn_bundle(PointLightBundle {
            transform: Transform::from_xyz(-3.0, 5.0, -3.0),
            point_light: PointLight {
                color: Color::BLUE,
                ..Default::default()
            },
            ..Default::default()
        })
        .insert(Rotates);
```

before fix:
<img width="1392" alt="Screenshot 2021-04-16 at 19 14 59" src="https://user-images.githubusercontent.com/8672791/115060744-866fb080-9ee8-11eb-8915-f87cc872ad48.png">

after fix:
<img width="1392" alt="Screenshot 2021-04-16 at 19 16 44" src="https://user-images.githubusercontent.com/8672791/115060759-8cfe2800-9ee8-11eb-92c2-d79f39c7b36b.png">




This PR changes `inverse_range_squared` to be a `[f32; 4]` instead of a `f32` to have the expected alignement
2021-04-19 19:30:39 +00:00
..
bevy_app run some examples on CI using swiftshader (#1826) 2021-04-14 21:40:36 +00:00
bevy_asset Make some asset loading functions monomorphic (#1861) 2021-04-10 16:17:32 +00:00
bevy_audio Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_core Doctest improvments (#1937) 2021-04-16 19:13:08 +00:00
bevy_derive Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_diagnostic Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_dylib Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_dynamic_plugin Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_ecs par_for_each: split batches when iterating on a sparse query (#1945) 2021-04-19 18:41:42 +00:00
bevy_gilrs Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_gltf calculate flat normals for mesh if missing (#1808) 2021-04-15 21:06:49 +00:00
bevy_input Moved events to ECS (#1823) 2021-04-13 20:36:37 +00:00
bevy_internal run some examples on CI using swiftshader (#1826) 2021-04-14 21:40:36 +00:00
bevy_log Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_math Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_pbr fix memory size for PointLightBundle (#1940) 2021-04-19 19:30:39 +00:00
bevy_reflect Override size_hint for all Iterators and add ExactSizeIterator where applicable (#1734) 2021-04-13 01:28:14 +00:00
bevy_render calculate flat normals for mesh if missing (#1808) 2021-04-15 21:06:49 +00:00
bevy_scene Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_sprite Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_tasks Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_text Update old docs mentioning Camera2dBundle (#1836) 2021-04-06 21:05:08 +00:00
bevy_transform Add synonyms for transform relative vectors (#1667) 2021-04-12 21:53:05 +00:00
bevy_ui Label for ui_focus_system (#1926) 2021-04-19 19:15:27 +00:00
bevy_utils Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_wgpu Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_window Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00
bevy_winit Release 0.5.0 (#1835) 2021-04-06 18:48:48 +00:00