bevy/crates/bevy_render/src
François 9098df3034 make pbr shader std140 compatible (#1798)
In shaders, `vec3` should be avoided for `std140` layout, as they take the size of a `vec4` and won't support manual padding by adding an additional `float`.

This change is needed for 3D to work in WebGL2. With it, I get PBR to render
<img width="1407" alt="Screenshot 2021-04-02 at 02 57 14" src="https://user-images.githubusercontent.com/8672791/113368551-5a3c2780-935f-11eb-8c8d-e9ba65b5ee98.png">

Without it, nothing renders... @cart Could this be considered for 0.5 release?

Also, I learned shaders 2 days ago, so don't hesitate to correct any issue or misunderstanding I may have

bevy_webgl2 PR in progress for Bevy 0.5 is here if you want to test: https://github.com/rparrett/bevy_webgl2/pull/1
2021-04-03 23:30:28 +00:00
..
camera Frustum Culling (for Sprites) (#1492) 2021-03-24 21:29:53 +00:00
mesh Add PBR textures (#1632) 2021-03-26 21:00:34 +00:00
pass Update to wgpu-rs 0.7 (#542) 2021-01-31 20:06:42 -08:00
pipeline fix clippy lints (#1756) 2021-03-25 20:48:18 +00:00
render_graph make pbr shader std140 compatible (#1798) 2021-04-03 23:30:28 +00:00
renderer format comments (#1612) 2021-03-11 00:27:30 +00:00
shader Add PBR textures (#1632) 2021-03-26 21:00:34 +00:00
texture fix clippy lints (#1756) 2021-03-25 20:48:18 +00:00
wireframe Remove remaining camerapos bindings (#1708) 2021-03-22 18:10:35 +00:00
color.rs color spaces and representation (#1572) 2021-03-17 23:59:51 +00:00
colorspace.rs color spaces and representation (#1572) 2021-03-17 23:59:51 +00:00
draw.rs Frustum Culling (for Sprites) (#1492) 2021-03-24 21:29:53 +00:00
entity.rs Bevy ECS V2 (#1525) 2021-03-05 07:54:35 +00:00
lib.rs Frustum Culling (for Sprites) (#1492) 2021-03-24 21:29:53 +00:00