Skip to content

armgit / raea

Public Imported from GitHub
0

Render Anything Engine: tell your AI what to make. Videos, motion graphics, 3D and games as React and TypeScript, rendered on your own GPU. Rust + Bevy, macOS, Linux and Windows.

FC2a: bindless Materials as Bevy draws them without bindless (shader/shader_material_bindless, shader_material_2d_bindless, 133/133)

shinyobjectz2ff13ee50b9a
diff --git a/bench/bevy-parity/examples.list b/bench/bevy-parity/examples.list
index 584dae04..959333ee 100644
--- a/bench/bevy-parity/examples.list
+++ b/bench/bevy-parity/examples.list
@@ -131,3 +131,5 @@ shader/storage_buffer
shader/array_texture
shader/sprite_material
shader/shader_prepass
+shader/shader_material_bindless
+shader/shader_material_2d_bindless
diff --git a/bench/bevy-parity/runs.tsv b/bench/bevy-parity/runs.tsv
index ddb4d099..b13722e5 100644
--- a/bench/bevy-parity/runs.tsv
+++ b/bench/bevy-parity/runs.tsv
@@ -130,3 +130,5 @@ shader/storage_buffer - 30,60
shader/array_texture - 30,100
shader/sprite_material - 29,40,70,95,110,130 bench/bevy-parity/input/sprite_material.json
shader/shader_prepass - 10,30,50,70 bench/bevy-parity/input/shader_prepass.json
+shader/shader_material_bindless - 10
+shader/shader_material_2d_bindless - 10
diff --git a/core/shape/src/lib.rs b/core/shape/src/lib.rs
index 40cf1848..5b6c8689 100644
--- a/core/shape/src/lib.rs
+++ b/core/shape/src/lib.rs
@@ -32,7 +32,7 @@ mod grown;
mod mesh;
mod parse;
mod sphere;
-pub use sphere::{SphereOf, cuboid_of, plane_of, sphere_of};
+pub use sphere::{SphereOf, cuboid_of, cylinder_of, plane_of, sphere_of};
pub use mesh::{export, from_mesh, read_glb, read_obj, to_mesh};
diff --git a/core/shape/src/sphere.rs b/core/shape/src/sphere.rs
index 02b37a95..afa71224 100644
--- a/core/shape/src/sphere.rs
+++ b/core/shape/src/sphere.rs
@@ -49,10 +49,30 @@ pub fn cuboid_of(expr: &str) -> Option<[f32; 3]> {
}
}
+/// The cylinder `expr` is, `<Cylinder>`'s `rotate(cone(r, r, h), -90, 0, 0)` alone (both radii equal, above 0): its
+/// radius and full height, drawn as Bevy's Cylinder mesh (32 sides, one segment), with its normals and texture
+/// coordinates, as a Bevy Mesh3d's is
+pub fn cylinder_of(expr: &str) -> Option<(f32, f32)> {
+ let inner = expr.trim().strip_prefix("rotate(cone(")?.strip_suffix("), -90, 0, 0)")?;
+ let n: Vec<f32> = inner.split(',').map(|s| s.trim().parse().ok()).collect::<Option<_>>()?;
+ match n.as_slice() {
+ &[a, b, h] if a == b && a > 0.0 && h > 0.0 => Some((a, h)),
+ _ => None,
+ }
+}
+
#[cfg(test)]
mod tests {
use super::*;
+ #[test]
+ fn a_cylinder_alone_is_read_and_a_cone_or_anything_more_is_not() {
+ assert_eq!(cylinder_of("rotate(cone(0.5, 0.5, 1), -90, 0, 0)"), Some((0.5, 1.0)));
+ for e in ["rotate(cone(0.5, 0.2, 1), -90, 0, 0)", "cone(0.5, 0.5, 1)", "move(rotate(cone(0.5, 0.5, 1), -90, 0, 0), 0, 1, 0)"] {
+ assert_eq!(cylinder_of(e), None, "{e}");
+ }
+ }
+
#[test]
fn a_box_alone_is_a_cuboid_and_a_plane_or_anything_more_is_not() {
assert_eq!(cuboid_of(" box(1, 2, 0.5) "), Some([1.0, 2.0, 0.5]));
diff --git a/docs/bevy-parity.md b/docs/bevy-parity.md
index bdff3a6b..b548755c 100644
--- a/docs/bevy-parity.md
+++ b/docs/bevy-parity.md
@@ -4,7 +4,7 @@ Bevy v0.20.0's examples against their raea TSX ports (docs/control.feature FC0a)
don't edit. An example passes when every probed frame passes pixels (SSIM 0.98 and no 32 px tile off by more than 24 of 255) and cost (batch keys and
frame time at most 1.25x the example's). Wall time is one machine's, measured in the same run.
-Examples: **438**, ported **131**, passing **131**, excluded **16** (docs/bevy-parity/excluded.tsv), left **291**.
+Examples: **438**, ported **133**, passing **133**, excluded **16** (docs/bevy-parity/excluded.tsv), left **289**.
raea's frame ms is its update's plus the time React takes to step a frame for its 3D (step), which the example
doesn't pay.
@@ -175,36 +175,38 @@ doesn't pay.
| 2d/sprite_scale | 10 | 0.992281 | 11 | 0 / 0 | 486 / 532 | 5 / 7 | 1 / 1 | 45.502 / 2.239 = 2.239 + 0 | yes | |
| 2d/sprite_scale | 60 | 0.992281 | 11 | 0 / 0 | 486 / 532 | 5 / 7 | 1 / 1 | 2.28 / 1.553 = 1.553 + 0 | yes | |
| 2d/sprite_slice | 10 | 0.997293 | 11 | 0 / 0 | 464 / 521 | 5 / 7 | 1 / 1 | 43.511 / 1.426 = 1.426 + 0 | yes | |
-| shader/extended_material | 30 | 1.000000 | 0 | 0 / 0 | 448 / 519 | 6 / 8 | 1 / 2 | 19.33 / 2.034 = 2.034 + 0 | yes | |
-| shader/extended_material | 60 | 1.000000 | 0 | 0 / 0 | 448 / 519 | 6 / 8 | 1 / 2 | 3.452 / 1.877 = 1.877 + 0 | yes | |
| 2d/mesh2d | 10 | 1.000000 | 0 | 0 / 0 | 441 / 518 | 6 / 8 | 1 / 1 | 45.401 / 2.518 = 2.518 + 0 | yes | |
| 2d/sprite | 10 | 1.000000 | 0 | 0 / 0 | 441 / 518 | 5 / 7 | 1 / 1 | 45.738 / 2.552 = 2.552 + 0 | yes | |
-| shader/animate_shader | 30 | 1.000000 | 0 | 0 / 0 | 447 / 519 | 6 / 8 | 1 / 2 | 18.832 / 1.498 = 1.498 + 0 | yes | |
-| shader/animate_shader | 60 | 1.000000 | 0 | 0 / 0 | 447 / 519 | 6 / 8 | 1 / 2 | 3.398 / 1.718 = 1.718 + 0 | yes | |
| 2d/sprite_sheet | 30 | 1.000000 | 0 | 0 / 0 | 441 / 518 | 5 / 7 | 1 / 1 | 17.822 / 1.703 = 1.703 + 0 | yes | |
| 2d/sprite_sheet | 60 | 1.000000 | 0 | 0 / 0 | 441 / 518 | 5 / 7 | 1 / 1 | 2.696 / 1.576 = 1.576 + 0 | yes | |
| ui/ui_material | 10 | 0.999993 | 0 | 0 / 0 | 446 / 518 | 5 / 7 | 1 / 1 | 46.74 / 2.14 = 2.14 + 0 | yes | |
-| shader/shader_material | 30 | 1.000000 | 0 | 0 / 0 | 447 / 519 | 6 / 8 | 1 / 2 | 18.783 / 1.808 = 1.808 + 0 | yes | |
-| shader/shader_defs | 10 | 0.999999 | 0 | 0 / 0 | 448 / 520 | 7 / 8 | 1 / 3 | 47.158 / 1.673 = 1.673 + 0 | yes | |
-| shader/shader_material_screenspace_texture | 10 | 0.998864 | 2 | 1 / 1 | 449 / 521 | 7 / 9 | 2 / 3 | 49.575 / 2.93 = 2.93 + 0 | yes | |
-| shader/shader_material_screenspace_texture | 60 | 0.998929 | 2 | 1 / 1 | 449 / 521 | 7 / 9 | 2 / 3 | 3.42 / 1.81 = 1.81 + 0 | yes | |
-| shader/shader_material_2d | 10 | 1.000000 | 0 | 0 / 0 | 447 / 519 | 6 / 8 | 1 / 1 | 44.328 / 2.569 = 2.569 + 0 | yes | |
-| shader/fallback_image | 10 | 1.000000 | 0 | 0 / 0 | 447 / 519 | 6 / 8 | 1 / 2 | 46.39 / 2.292 = 2.292 + 0 | yes | |
-| shader/array_texture | 100 | 1.000000 | 0 | 0 / 0 | 458 / 542 | 6 / 8 | 1 / 12 | 3.291 / 1.574 = 1.574 + 0 | yes | |
-| shader/array_texture | 30 | 1.000000 | 0 | 0 / 0 | 458 / 542 | 6 / 8 | 1 / 12 | 19.391 / 1.975 = 1.975 + 0 | yes | |
-| shader/storage_buffer | 30 | 0.999999 | 0 | 0 / 0 | 538 / 973 | 6 / 8 | 1 / 92 | 19.664 / 2.053 = 2.053 + 0 | yes | |
-| shader/storage_buffer | 60 | 0.999999 | 0 | 0 / 0 | 538 / 973 | 6 / 8 | 1 / 92 | 3.572 / 1.798 = 1.798 + 0 | yes | |
| ui/widgets/standard_widgets | 10 | 0.994691 | 17 | 0 / 0 | 487 / 516 | 5 / 7 | 1 / 1 | 45.788 / 2.282 = 2.282 + 0 | yes | |
-| shader/sprite_material | 110 | 0.999832 | 7 | 0 / 0 | 455 / 520 | 5 / 7 | 1 / 1 | 2.188 / 1.566 = 1.566 + 0 | yes | |
-| shader/sprite_material | 130 | 0.999832 | 7 | 0 / 0 | 455 / 520 | 5 / 7 | 1 / 1 | 2.472 / 1.413 = 1.413 + 0 | yes | |
-| shader/sprite_material | 29 | 0.999832 | 7 | 0 / 0 | 455 / 520 | 5 / 7 | 1 / 1 | 17.195 / 1.746 = 1.746 + 0 | yes | |
-| shader/sprite_material | 40 | 0.999832 | 7 | 0 / 0 | 455 / 520 | 5 / 7 | 1 / 1 | 2.863 / 1.279 = 1.279 + 0 | yes | |
-| shader/sprite_material | 70 | 0.999832 | 7 | 0 / 0 | 455 / 520 | 5 / 7 | 1 / 1 | 2.457 / 1.325 = 1.325 + 0 | yes | |
-| shader/sprite_material | 95 | 0.999832 | 7 | 0 / 0 | 455 / 520 | 5 / 7 | 1 / 1 | 2.122 / 1.418 = 1.418 + 0 | yes | |
-| shader/shader_prepass | 10 | 0.995071 | 7 | 2 / 2 | 465 / 533 | 10 / 11 | 3 / 6 | 53.512 / 4.148 = 4.148 + 0 | yes | |
-| shader/shader_prepass | 30 | 0.995869 | 7 | 2 / 2 | 465 / 533 | 10 / 11 | 3 / 6 | 5.599 / 2.778 = 2.778 + 0 | yes | |
-| shader/shader_prepass | 50 | 0.994765 | 7 | 2 / 2 | 465 / 533 | 10 / 11 | 3 / 6 | 5.082 / 2.869 = 2.869 + 0 | yes | |
-| shader/shader_prepass | 70 | 0.997658 | 7 | 2 / 2 | 465 / 533 | 10 / 11 | 3 / 6 | 4.626 / 2.77 = 2.77 + 0 | yes | |
+| shader/extended_material | 30 | 1.000000 | 0 | 0 / 0 | 448 / 519 | 6 / 8 | 1 / 2 | 19.262 / 1.777 = 1.777 + 0 | yes | |
+| shader/extended_material | 60 | 1.000000 | 0 | 0 / 0 | 448 / 519 | 6 / 8 | 1 / 2 | 3.421 / 1.354 = 1.354 + 0 | yes | |
+| shader/animate_shader | 30 | 1.000000 | 0 | 0 / 0 | 447 / 519 | 6 / 8 | 1 / 2 | 18.511 / 1.601 = 1.601 + 0 | yes | |
+| shader/animate_shader | 60 | 1.000000 | 0 | 0 / 0 | 447 / 519 | 6 / 8 | 1 / 2 | 3.445 / 1.537 = 1.537 + 0 | yes | |
+| shader/shader_material | 30 | 1.000000 | 0 | 0 / 0 | 447 / 519 | 6 / 8 | 1 / 2 | 18.188 / 1.683 = 1.683 + 0 | yes | |
+| shader/shader_defs | 10 | 0.999999 | 0 | 0 / 0 | 448 / 520 | 7 / 8 | 1 / 3 | 49.678 / 1.841 = 1.841 + 0 | yes | |
+| shader/shader_material_screenspace_texture | 10 | 0.998864 | 2 | 1 / 1 | 449 / 521 | 7 / 9 | 2 / 3 | 48.039 / 2.451 = 2.451 + 0 | yes | |
+| shader/shader_material_screenspace_texture | 60 | 0.998929 | 2 | 1 / 1 | 449 / 521 | 7 / 9 | 2 / 3 | 3.478 / 1.579 = 1.579 + 0 | yes | |
+| shader/shader_material_2d | 10 | 1.000000 | 0 | 0 / 0 | 447 / 519 | 6 / 8 | 1 / 1 | 44.581 / 1.682 = 1.682 + 0 | yes | |
+| shader/fallback_image | 10 | 1.000000 | 0 | 0 / 0 | 447 / 519 | 6 / 8 | 1 / 2 | 45.892 / 1.614 = 1.614 + 0 | yes | |
+| shader/storage_buffer | 30 | 0.999999 | 0 | 0 / 0 | 538 / 973 | 6 / 8 | 1 / 92 | 18.382 / 1.57 = 1.57 + 0 | yes | |
+| shader/storage_buffer | 60 | 0.999999 | 0 | 0 / 0 | 538 / 973 | 6 / 8 | 1 / 92 | 3.609 / 1.318 = 1.318 + 0 | yes | |
+| shader/array_texture | 100 | 1.000000 | 0 | 0 / 0 | 458 / 542 | 6 / 8 | 1 / 12 | 3.126 / 1.301 = 1.301 + 0 | yes | |
+| shader/array_texture | 30 | 1.000000 | 0 | 0 / 0 | 458 / 542 | 6 / 8 | 1 / 12 | 19.532 / 2.113 = 2.113 + 0 | yes | |
+| shader/sprite_material | 110 | 0.999832 | 7 | 0 / 0 | 455 / 520 | 5 / 7 | 1 / 1 | 2.052 / 1.283 = 1.283 + 0 | yes | |
+| shader/sprite_material | 130 | 0.999832 | 7 | 0 / 0 | 455 / 520 | 5 / 7 | 1 / 1 | 2.37 / 1.26 = 1.26 + 0 | yes | |
+| shader/sprite_material | 29 | 0.999832 | 7 | 0 / 0 | 455 / 520 | 5 / 7 | 1 / 1 | 18.898 / 1.948 = 1.948 + 0 | yes | |
+| shader/sprite_material | 40 | 0.999832 | 7 | 0 / 0 | 455 / 520 | 5 / 7 | 1 / 1 | 2.503 / 1.571 = 1.571 + 0 | yes | |
+| shader/sprite_material | 70 | 0.999832 | 7 | 0 / 0 | 455 / 520 | 5 / 7 | 1 / 1 | 2.438 / 1.365 = 1.365 + 0 | yes | |
+| shader/sprite_material | 95 | 0.999832 | 7 | 0 / 0 | 455 / 520 | 5 / 7 | 1 / 1 | 2.371 / 1.441 = 1.441 + 0 | yes | |
+| shader/shader_prepass | 10 | 0.995071 | 7 | 2 / 2 | 465 / 533 | 10 / 11 | 3 / 6 | 56.428 / 3.642 = 3.642 + 0 | yes | |
+| shader/shader_prepass | 30 | 0.995869 | 7 | 2 / 2 | 465 / 533 | 10 / 11 | 3 / 6 | 5.487 / 2.948 = 2.948 + 0 | yes | |
+| shader/shader_prepass | 50 | 0.994765 | 7 | 2 / 2 | 465 / 533 | 10 / 11 | 3 / 6 | 4.922 / 2.911 = 2.911 + 0 | yes | |
+| shader/shader_prepass | 70 | 0.997658 | 7 | 2 / 2 | 465 / 533 | 10 / 11 | 3 / 6 | 4.821 / 2.659 = 2.659 + 0 | yes | |
+| shader/shader_material_bindless | 10 | 1.000000 | 0 | 0 / 0 | 448 / 520 | 7 / 9 | 1 / 3 | 44.325 / 2.554 = 2.554 + 0 | yes | |
+| shader/shader_material_2d_bindless | 10 | 1.000000 | 0 | 0 / 0 | 450 / 522 | 6 / 11 | 1 / 1 | 44.048 / 2.131 = 2.131 + 0 | yes | |
## Excluded
diff --git a/docs/bevy-parity/results.jsonl b/docs/bevy-parity/results.jsonl
index 1dbc6f9d..74242f8e 100644
--- a/docs/bevy-parity/results.jsonl
+++ b/docs/bevy-parity/results.jsonl
@@ -162,33 +162,35 @@
{"example":"2d/sprite_scale","frame":10,"ssim":0.992281,"tile":11,"bevy":{"batch_keys":0,"entities":486,"extents":[],"frame":10,"frame_ms":45.502,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":532,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":2.239,"step_ms":null,"cost_ms":2.239},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
{"example":"2d/sprite_scale","frame":60,"ssim":0.992281,"tile":11,"bevy":{"batch_keys":0,"entities":486,"extents":[],"frame":60,"frame_ms":2.28,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":67,"entities":532,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.553,"step_ms":null,"cost_ms":1.553},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
{"example":"2d/sprite_slice","frame":10,"ssim":0.997293,"tile":11,"bevy":{"batch_keys":0,"entities":464,"extents":[],"frame":10,"frame_ms":43.511,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":521,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.426,"step_ms":null,"cost_ms":1.426},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
-{"example":"shader/extended_material","frame":30,"ssim":1.000000,"tile":0,"bevy":{"batch_keys":0,"entities":448,"extents":["0.9945 1.0000 1.0000"],"frame":30,"frame_ms":19.33,"materials":1,"mesh_entities":1,"meshes":6,"other_material":1,"visible":1},"raea":{"frame":37,"entities":519,"mesh_entities":1,"visible":1,"meshes":8,"materials":2,"batch_keys":0,"other_material":1,"extents":["0.9945 1.0000 1.0000"],"frame_ms":2.034,"step_ms":null,"cost_ms":2.034},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
-{"example":"shader/extended_material","frame":60,"ssim":1.000000,"tile":0,"bevy":{"batch_keys":0,"entities":448,"extents":["0.9945 1.0000 1.0000"],"frame":60,"frame_ms":3.452,"materials":1,"mesh_entities":1,"meshes":6,"other_material":1,"visible":1},"raea":{"frame":67,"entities":519,"mesh_entities":1,"visible":1,"meshes":8,"materials":2,"batch_keys":0,"other_material":1,"extents":["0.9945 1.0000 1.0000"],"frame_ms":1.877,"step_ms":null,"cost_ms":1.877},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
{"example":"2d/mesh2d","frame":10,"ssim":1.000000,"tile":0,"bevy":{"batch_keys":0,"entities":441,"extents":[],"frame":10,"frame_ms":45.401,"materials":1,"mesh_entities":0,"meshes":6,"other_material":0,"visible":0},"raea":{"frame":17,"entities":518,"mesh_entities":0,"visible":0,"meshes":8,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":2.518,"step_ms":null,"cost_ms":2.518},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
{"example":"2d/sprite","frame":10,"ssim":1.000000,"tile":0,"bevy":{"batch_keys":0,"entities":441,"extents":[],"frame":10,"frame_ms":45.738,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":518,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":2.552,"step_ms":null,"cost_ms":2.552},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
-{"example":"shader/animate_shader","frame":30,"ssim":1.000000,"tile":0,"bevy":{"batch_keys":0,"entities":447,"extents":["0.5000 0.5000 0.5000"],"frame":30,"frame_ms":18.832,"materials":1,"mesh_entities":1,"meshes":6,"other_material":1,"visible":1},"raea":{"frame":37,"entities":519,"mesh_entities":1,"visible":1,"meshes":8,"materials":2,"batch_keys":0,"other_material":1,"extents":["0.5000 0.5000 0.5000"],"frame_ms":1.498,"step_ms":null,"cost_ms":1.498},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
-{"example":"shader/animate_shader","frame":60,"ssim":1.000000,"tile":0,"bevy":{"batch_keys":0,"entities":447,"extents":["0.5000 0.5000 0.5000"],"frame":60,"frame_ms":3.398,"materials":1,"mesh_entities":1,"meshes":6,"other_material":1,"visible":1},"raea":{"frame":67,"entities":519,"mesh_entities":1,"visible":1,"meshes":8,"materials":2,"batch_keys":0,"other_material":1,"extents":["0.5000 0.5000 0.5000"],"frame_ms":1.718,"step_ms":null,"cost_ms":1.718},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
{"example":"2d/sprite_sheet","frame":30,"ssim":1.000000,"tile":0,"bevy":{"batch_keys":0,"entities":441,"extents":[],"frame":30,"frame_ms":17.822,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":37,"entities":518,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.703,"step_ms":null,"cost_ms":1.703},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
{"example":"2d/sprite_sheet","frame":60,"ssim":1.000000,"tile":0,"bevy":{"batch_keys":0,"entities":441,"extents":[],"frame":60,"frame_ms":2.696,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":67,"entities":518,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.576,"step_ms":null,"cost_ms":1.576},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
{"example":"ui/ui_material","frame":10,"ssim":0.999993,"tile":0,"bevy":{"batch_keys":0,"entities":446,"extents":[],"frame":10,"frame_ms":46.74,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":518,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":2.14,"step_ms":null,"cost_ms":2.14},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
-{"example":"shader/shader_material","frame":30,"ssim":1.000000,"tile":0,"bevy":{"batch_keys":0,"entities":447,"extents":["0.5000 0.5000 0.5000"],"frame":30,"frame_ms":18.783,"materials":1,"mesh_entities":1,"meshes":6,"other_material":1,"visible":1},"raea":{"frame":38,"entities":519,"mesh_entities":1,"visible":1,"meshes":8,"materials":2,"batch_keys":0,"other_material":1,"extents":["0.5000 0.5000 0.5000"],"frame_ms":1.808,"step_ms":null,"cost_ms":1.808},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
-{"example":"shader/shader_defs","frame":10,"ssim":0.999999,"tile":0,"bevy":{"batch_keys":0,"entities":448,"extents":["0.5000 0.5000 0.5000"],"frame":10,"frame_ms":47.158,"materials":1,"mesh_entities":2,"meshes":7,"other_material":2,"visible":2},"raea":{"frame":17,"entities":520,"mesh_entities":2,"visible":2,"meshes":8,"materials":3,"batch_keys":0,"other_material":2,"extents":["0.5000 0.5000 0.5000"],"frame_ms":1.673,"step_ms":null,"cost_ms":1.673},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
-{"example":"shader/shader_material_screenspace_texture","frame":10,"ssim":0.998864,"tile":2,"bevy":{"batch_keys":1,"entities":449,"extents":["0.5000 0.5000 0.5000","2.5000 0.0000 2.5000"],"frame":10,"frame_ms":49.575,"materials":2,"mesh_entities":2,"meshes":7,"other_material":1,"visible":2},"raea":{"frame":18,"entities":521,"mesh_entities":2,"visible":2,"meshes":9,"materials":3,"batch_keys":1,"other_material":1,"extents":["0.5000 0.5000 0.5000","2.5000 0.0000 2.5000"],"frame_ms":2.93,"step_ms":null,"cost_ms":2.93},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
-{"example":"shader/shader_material_screenspace_texture","frame":60,"ssim":0.998929,"tile":2,"bevy":{"batch_keys":1,"entities":449,"extents":["0.5000 0.5000 0.5000","2.5000 0.0000 2.5000"],"frame":60,"frame_ms":3.42,"materials":2,"mesh_entities":2,"meshes":7,"other_material":1,"visible":2},"raea":{"frame":69,"entities":521,"mesh_entities":2,"visible":2,"meshes":9,"materials":3,"batch_keys":1,"other_material":1,"extents":["0.5000 0.5000 0.5000","2.5000 0.0000 2.5000"],"frame_ms":1.81,"step_ms":null,"cost_ms":1.81},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
-{"example":"shader/shader_material_2d","frame":10,"ssim":1.000000,"tile":0,"bevy":{"batch_keys":0,"entities":447,"extents":[],"frame":10,"frame_ms":44.328,"materials":1,"mesh_entities":0,"meshes":6,"other_material":0,"visible":0},"raea":{"frame":17,"entities":519,"mesh_entities":0,"visible":0,"meshes":8,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":2.569,"step_ms":null,"cost_ms":2.569},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
-{"example":"shader/fallback_image","frame":10,"ssim":1.000000,"tile":0,"bevy":{"batch_keys":0,"entities":447,"extents":["0.5000 0.5000 0.5000"],"frame":10,"frame_ms":46.39,"materials":1,"mesh_entities":1,"meshes":6,"other_material":1,"visible":1},"raea":{"frame":17,"entities":519,"mesh_entities":1,"visible":1,"meshes":8,"materials":2,"batch_keys":0,"other_material":1,"extents":["0.5000 0.5000 0.5000"],"frame_ms":2.292,"step_ms":null,"cost_ms":2.292},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
-{"example":"shader/array_texture","frame":100,"ssim":1.000000,"tile":0,"bevy":{"batch_keys":0,"entities":458,"extents":["0.5000 0.5000 0.5000"],"frame":100,"frame_ms":3.291,"materials":1,"mesh_entities":11,"meshes":6,"other_material":11,"visible":11},"raea":{"frame":109,"entities":542,"mesh_entities":11,"visible":11,"meshes":8,"materials":12,"batch_keys":0,"other_material":11,"extents":["0.5000 0.5000 0.5000"],"frame_ms":1.574,"step_ms":null,"cost_ms":1.574},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
-{"example":"shader/array_texture","frame":30,"ssim":1.000000,"tile":0,"bevy":{"batch_keys":0,"entities":458,"extents":["0.5000 0.5000 0.5000"],"frame":30,"frame_ms":19.391,"materials":1,"mesh_entities":11,"meshes":6,"other_material":11,"visible":11},"raea":{"frame":39,"entities":542,"mesh_entities":11,"visible":11,"meshes":8,"materials":12,"batch_keys":0,"other_material":11,"extents":["0.5000 0.5000 0.5000"],"frame_ms":1.975,"step_ms":null,"cost_ms":1.975},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
-{"example":"shader/storage_buffer","frame":30,"ssim":0.999999,"tile":0,"bevy":{"batch_keys":0,"entities":538,"extents":["0.1500 0.1500 0.1500"],"frame":30,"frame_ms":19.664,"materials":1,"mesh_entities":91,"meshes":6,"other_material":91,"visible":91},"raea":{"frame":37,"entities":973,"mesh_entities":91,"visible":91,"meshes":8,"materials":92,"batch_keys":0,"other_material":91,"extents":["0.1500 0.1500 0.1500"],"frame_ms":2.053,"step_ms":null,"cost_ms":2.053},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
-{"example":"shader/storage_buffer","frame":60,"ssim":0.999999,"tile":0,"bevy":{"batch_keys":0,"entities":538,"extents":["0.1500 0.1500 0.1500"],"frame":60,"frame_ms":3.572,"materials":1,"mesh_entities":91,"meshes":6,"other_material":91,"visible":91},"raea":{"frame":67,"entities":973,"mesh_entities":91,"visible":91,"meshes":8,"materials":92,"batch_keys":0,"other_material":91,"extents":["0.1500 0.1500 0.1500"],"frame_ms":1.798,"step_ms":null,"cost_ms":1.798},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
{"example":"ui/widgets/standard_widgets","frame":10,"ssim":0.994691,"tile":17,"bevy":{"batch_keys":0,"entities":487,"extents":[],"frame":10,"frame_ms":45.788,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":17,"entities":516,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":2.282,"step_ms":null,"cost_ms":2.282},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
-{"example":"shader/sprite_material","frame":110,"ssim":0.999832,"tile":7,"bevy":{"batch_keys":0,"entities":455,"extents":[],"frame":110,"frame_ms":2.188,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":117,"entities":520,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.566,"step_ms":null,"cost_ms":1.566},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
-{"example":"shader/sprite_material","frame":130,"ssim":0.999832,"tile":7,"bevy":{"batch_keys":0,"entities":455,"extents":[],"frame":130,"frame_ms":2.472,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":137,"entities":520,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.413,"step_ms":null,"cost_ms":1.413},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
-{"example":"shader/sprite_material","frame":29,"ssim":0.999832,"tile":7,"bevy":{"batch_keys":0,"entities":455,"extents":[],"frame":29,"frame_ms":17.195,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":36,"entities":520,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.746,"step_ms":null,"cost_ms":1.746},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
-{"example":"shader/sprite_material","frame":40,"ssim":0.999832,"tile":7,"bevy":{"batch_keys":0,"entities":455,"extents":[],"frame":40,"frame_ms":2.863,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":47,"entities":520,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.279,"step_ms":null,"cost_ms":1.279},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
-{"example":"shader/sprite_material","frame":70,"ssim":0.999832,"tile":7,"bevy":{"batch_keys":0,"entities":455,"extents":[],"frame":70,"frame_ms":2.457,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":77,"entities":520,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.325,"step_ms":null,"cost_ms":1.325},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
-{"example":"shader/sprite_material","frame":95,"ssim":0.999832,"tile":7,"bevy":{"batch_keys":0,"entities":455,"extents":[],"frame":95,"frame_ms":2.122,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":102,"entities":520,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.418,"step_ms":null,"cost_ms":1.418},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
-{"example":"shader/shader_prepass","frame":10,"ssim":0.995071,"tile":7,"bevy":{"batch_keys":2,"entities":465,"extents":["0.5000 0.5000 0.5000","10.0000 10.0000 0.0000","2.5000 0.0000 2.5000"],"frame":10,"frame_ms":53.512,"materials":3,"mesh_entities":5,"meshes":10,"other_material":3,"visible":5},"raea":{"frame":18,"entities":533,"mesh_entities":5,"visible":5,"meshes":11,"materials":6,"batch_keys":2,"other_material":3,"extents":["0.5000 0.5000 0.5000","10.0000 0.0000 10.0000","2.5000 0.0000 2.5000"],"frame_ms":4.148,"step_ms":null,"cost_ms":4.148},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
-{"example":"shader/shader_prepass","frame":30,"ssim":0.995869,"tile":7,"bevy":{"batch_keys":2,"entities":465,"extents":["0.5000 0.5000 0.5000","10.0000 10.0000 0.0000","2.5000 0.0000 2.5000"],"frame":30,"frame_ms":5.599,"materials":3,"mesh_entities":5,"meshes":10,"other_material":3,"visible":5},"raea":{"frame":38,"entities":533,"mesh_entities":5,"visible":5,"meshes":11,"materials":6,"batch_keys":2,"other_material":3,"extents":["0.5000 0.5000 0.5000","10.0000 0.0000 10.0000","2.5000 0.0000 2.5000"],"frame_ms":2.778,"step_ms":null,"cost_ms":2.778},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
-{"example":"shader/shader_prepass","frame":50,"ssim":0.994765,"tile":7,"bevy":{"batch_keys":2,"entities":465,"extents":["0.5000 0.5000 0.5000","10.0000 10.0000 0.0000","2.5000 0.0000 2.5000"],"frame":50,"frame_ms":5.082,"materials":3,"mesh_entities":5,"meshes":10,"other_material":3,"visible":5},"raea":{"frame":58,"entities":533,"mesh_entities":5,"visible":5,"meshes":11,"materials":6,"batch_keys":2,"other_material":3,"extents":["0.5000 0.5000 0.5000","10.0000 0.0000 10.0000","2.5000 0.0000 2.5000"],"frame_ms":2.869,"step_ms":null,"cost_ms":2.869},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
-{"example":"shader/shader_prepass","frame":70,"ssim":0.997658,"tile":7,"bevy":{"batch_keys":2,"entities":465,"extents":["0.5000 0.5000 0.5000","10.0000 10.0000 0.0000","2.5000 0.0000 2.5000"],"frame":70,"frame_ms":4.626,"materials":3,"mesh_entities":5,"meshes":10,"other_material":3,"visible":5},"raea":{"frame":78,"entities":533,"mesh_entities":5,"visible":5,"meshes":11,"materials":6,"batch_keys":2,"other_material":3,"extents":["0.5000 0.5000 0.5000","10.0000 0.0000 10.0000","2.5000 0.0000 2.5000"],"frame_ms":2.77,"step_ms":null,"cost_ms":2.77},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
+{"example":"shader/extended_material","frame":30,"ssim":1.000000,"tile":0,"bevy":{"batch_keys":0,"entities":448,"extents":["0.9945 1.0000 1.0000"],"frame":30,"frame_ms":19.262,"materials":1,"mesh_entities":1,"meshes":6,"other_material":1,"visible":1},"raea":{"frame":37,"entities":519,"mesh_entities":1,"visible":1,"meshes":8,"materials":2,"batch_keys":0,"other_material":1,"extents":["0.9945 1.0000 1.0000"],"frame_ms":1.777,"step_ms":null,"cost_ms":1.777},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
+{"example":"shader/extended_material","frame":60,"ssim":1.000000,"tile":0,"bevy":{"batch_keys":0,"entities":448,"extents":["0.9945 1.0000 1.0000"],"frame":60,"frame_ms":3.421,"materials":1,"mesh_entities":1,"meshes":6,"other_material":1,"visible":1},"raea":{"frame":67,"entities":519,"mesh_entities":1,"visible":1,"meshes":8,"materials":2,"batch_keys":0,"other_material":1,"extents":["0.9945 1.0000 1.0000"],"frame_ms":1.354,"step_ms":null,"cost_ms":1.354},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
+{"example":"shader/animate_shader","frame":30,"ssim":1.000000,"tile":0,"bevy":{"batch_keys":0,"entities":447,"extents":["0.5000 0.5000 0.5000"],"frame":30,"frame_ms":18.511,"materials":1,"mesh_entities":1,"meshes":6,"other_material":1,"visible":1},"raea":{"frame":37,"entities":519,"mesh_entities":1,"visible":1,"meshes":8,"materials":2,"batch_keys":0,"other_material":1,"extents":["0.5000 0.5000 0.5000"],"frame_ms":1.601,"step_ms":null,"cost_ms":1.601},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
+{"example":"shader/animate_shader","frame":60,"ssim":1.000000,"tile":0,"bevy":{"batch_keys":0,"entities":447,"extents":["0.5000 0.5000 0.5000"],"frame":60,"frame_ms":3.445,"materials":1,"mesh_entities":1,"meshes":6,"other_material":1,"visible":1},"raea":{"frame":67,"entities":519,"mesh_entities":1,"visible":1,"meshes":8,"materials":2,"batch_keys":0,"other_material":1,"extents":["0.5000 0.5000 0.5000"],"frame_ms":1.537,"step_ms":null,"cost_ms":1.537},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
+{"example":"shader/shader_material","frame":30,"ssim":1.000000,"tile":0,"bevy":{"batch_keys":0,"entities":447,"extents":["0.5000 0.5000 0.5000"],"frame":30,"frame_ms":18.188,"materials":1,"mesh_entities":1,"meshes":6,"other_material":1,"visible":1},"raea":{"frame":38,"entities":519,"mesh_entities":1,"visible":1,"meshes":8,"materials":2,"batch_keys":0,"other_material":1,"extents":["0.5000 0.5000 0.5000"],"frame_ms":1.683,"step_ms":null,"cost_ms":1.683},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
+{"example":"shader/shader_defs","frame":10,"ssim":0.999999,"tile":0,"bevy":{"batch_keys":0,"entities":448,"extents":["0.5000 0.5000 0.5000"],"frame":10,"frame_ms":49.678,"materials":1,"mesh_entities":2,"meshes":7,"other_material":2,"visible":2},"raea":{"frame":17,"entities":520,"mesh_entities":2,"visible":2,"meshes":8,"materials":3,"batch_keys":0,"other_material":2,"extents":["0.5000 0.5000 0.5000"],"frame_ms":1.841,"step_ms":null,"cost_ms":1.841},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
+{"example":"shader/shader_material_screenspace_texture","frame":10,"ssim":0.998864,"tile":2,"bevy":{"batch_keys":1,"entities":449,"extents":["0.5000 0.5000 0.5000","2.5000 0.0000 2.5000"],"frame":10,"frame_ms":48.039,"materials":2,"mesh_entities":2,"meshes":7,"other_material":1,"visible":2},"raea":{"frame":19,"entities":521,"mesh_entities":2,"visible":2,"meshes":9,"materials":3,"batch_keys":1,"other_material":1,"extents":["0.5000 0.5000 0.5000","2.5000 0.0000 2.5000"],"frame_ms":2.451,"step_ms":null,"cost_ms":2.451},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
+{"example":"shader/shader_material_screenspace_texture","frame":60,"ssim":0.998929,"tile":2,"bevy":{"batch_keys":1,"entities":449,"extents":["0.5000 0.5000 0.5000","2.5000 0.0000 2.5000"],"frame":60,"frame_ms":3.478,"materials":2,"mesh_entities":2,"meshes":7,"other_material":1,"visible":2},"raea":{"frame":69,"entities":521,"mesh_entities":2,"visible":2,"meshes":9,"materials":3,"batch_keys":1,"other_material":1,"extents":["0.5000 0.5000 0.5000","2.5000 0.0000 2.5000"],"frame_ms":1.579,"step_ms":null,"cost_ms":1.579},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
+{"example":"shader/shader_material_2d","frame":10,"ssim":1.000000,"tile":0,"bevy":{"batch_keys":0,"entities":447,"extents":[],"frame":10,"frame_ms":44.581,"materials":1,"mesh_entities":0,"meshes":6,"other_material":0,"visible":0},"raea":{"frame":17,"entities":519,"mesh_entities":0,"visible":0,"meshes":8,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.682,"step_ms":null,"cost_ms":1.682},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
+{"example":"shader/fallback_image","frame":10,"ssim":1.000000,"tile":0,"bevy":{"batch_keys":0,"entities":447,"extents":["0.5000 0.5000 0.5000"],"frame":10,"frame_ms":45.892,"materials":1,"mesh_entities":1,"meshes":6,"other_material":1,"visible":1},"raea":{"frame":17,"entities":519,"mesh_entities":1,"visible":1,"meshes":8,"materials":2,"batch_keys":0,"other_material":1,"extents":["0.5000 0.5000 0.5000"],"frame_ms":1.614,"step_ms":null,"cost_ms":1.614},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
+{"example":"shader/storage_buffer","frame":30,"ssim":0.999999,"tile":0,"bevy":{"batch_keys":0,"entities":538,"extents":["0.1500 0.1500 0.1500"],"frame":30,"frame_ms":18.382,"materials":1,"mesh_entities":91,"meshes":6,"other_material":91,"visible":91},"raea":{"frame":37,"entities":973,"mesh_entities":91,"visible":91,"meshes":8,"materials":92,"batch_keys":0,"other_material":91,"extents":["0.1500 0.1500 0.1500"],"frame_ms":1.57,"step_ms":null,"cost_ms":1.57},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
+{"example":"shader/storage_buffer","frame":60,"ssim":0.999999,"tile":0,"bevy":{"batch_keys":0,"entities":538,"extents":["0.1500 0.1500 0.1500"],"frame":60,"frame_ms":3.609,"materials":1,"mesh_entities":91,"meshes":6,"other_material":91,"visible":91},"raea":{"frame":67,"entities":973,"mesh_entities":91,"visible":91,"meshes":8,"materials":92,"batch_keys":0,"other_material":91,"extents":["0.1500 0.1500 0.1500"],"frame_ms":1.318,"step_ms":null,"cost_ms":1.318},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
+{"example":"shader/array_texture","frame":100,"ssim":1.000000,"tile":0,"bevy":{"batch_keys":0,"entities":458,"extents":["0.5000 0.5000 0.5000"],"frame":100,"frame_ms":3.126,"materials":1,"mesh_entities":11,"meshes":6,"other_material":11,"visible":11},"raea":{"frame":108,"entities":542,"mesh_entities":11,"visible":11,"meshes":8,"materials":12,"batch_keys":0,"other_material":11,"extents":["0.5000 0.5000 0.5000"],"frame_ms":1.301,"step_ms":null,"cost_ms":1.301},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
+{"example":"shader/array_texture","frame":30,"ssim":1.000000,"tile":0,"bevy":{"batch_keys":0,"entities":458,"extents":["0.5000 0.5000 0.5000"],"frame":30,"frame_ms":19.532,"materials":1,"mesh_entities":11,"meshes":6,"other_material":11,"visible":11},"raea":{"frame":39,"entities":542,"mesh_entities":11,"visible":11,"meshes":8,"materials":12,"batch_keys":0,"other_material":11,"extents":["0.5000 0.5000 0.5000"],"frame_ms":2.113,"step_ms":null,"cost_ms":2.113},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
+{"example":"shader/sprite_material","frame":110,"ssim":0.999832,"tile":7,"bevy":{"batch_keys":0,"entities":455,"extents":[],"frame":110,"frame_ms":2.052,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":117,"entities":520,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.283,"step_ms":null,"cost_ms":1.283},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
+{"example":"shader/sprite_material","frame":130,"ssim":0.999832,"tile":7,"bevy":{"batch_keys":0,"entities":455,"extents":[],"frame":130,"frame_ms":2.37,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":137,"entities":520,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.26,"step_ms":null,"cost_ms":1.26},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
+{"example":"shader/sprite_material","frame":29,"ssim":0.999832,"tile":7,"bevy":{"batch_keys":0,"entities":455,"extents":[],"frame":29,"frame_ms":18.898,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":36,"entities":520,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.948,"step_ms":null,"cost_ms":1.948},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
+{"example":"shader/sprite_material","frame":40,"ssim":0.999832,"tile":7,"bevy":{"batch_keys":0,"entities":455,"extents":[],"frame":40,"frame_ms":2.503,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":47,"entities":520,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.571,"step_ms":null,"cost_ms":1.571},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
+{"example":"shader/sprite_material","frame":70,"ssim":0.999832,"tile":7,"bevy":{"batch_keys":0,"entities":455,"extents":[],"frame":70,"frame_ms":2.438,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":77,"entities":520,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.365,"step_ms":null,"cost_ms":1.365},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
+{"example":"shader/sprite_material","frame":95,"ssim":0.999832,"tile":7,"bevy":{"batch_keys":0,"entities":455,"extents":[],"frame":95,"frame_ms":2.371,"materials":1,"mesh_entities":0,"meshes":5,"other_material":0,"visible":0},"raea":{"frame":102,"entities":520,"mesh_entities":0,"visible":0,"meshes":7,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":1.441,"step_ms":null,"cost_ms":1.441},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
+{"example":"shader/shader_prepass","frame":10,"ssim":0.995071,"tile":7,"bevy":{"batch_keys":2,"entities":465,"extents":["0.5000 0.5000 0.5000","10.0000 10.0000 0.0000","2.5000 0.0000 2.5000"],"frame":10,"frame_ms":56.428,"materials":3,"mesh_entities":5,"meshes":10,"other_material":3,"visible":5},"raea":{"frame":18,"entities":533,"mesh_entities":5,"visible":5,"meshes":11,"materials":6,"batch_keys":2,"other_material":3,"extents":["0.5000 0.5000 0.5000","10.0000 0.0000 10.0000","2.5000 0.0000 2.5000"],"frame_ms":3.642,"step_ms":null,"cost_ms":3.642},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
+{"example":"shader/shader_prepass","frame":30,"ssim":0.995869,"tile":7,"bevy":{"batch_keys":2,"entities":465,"extents":["0.5000 0.5000 0.5000","10.0000 10.0000 0.0000","2.5000 0.0000 2.5000"],"frame":30,"frame_ms":5.487,"materials":3,"mesh_entities":5,"meshes":10,"other_material":3,"visible":5},"raea":{"frame":38,"entities":533,"mesh_entities":5,"visible":5,"meshes":11,"materials":6,"batch_keys":2,"other_material":3,"extents":["0.5000 0.5000 0.5000","10.0000 0.0000 10.0000","2.5000 0.0000 2.5000"],"frame_ms":2.948,"step_ms":null,"cost_ms":2.948},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
+{"example":"shader/shader_prepass","frame":50,"ssim":0.994765,"tile":7,"bevy":{"batch_keys":2,"entities":465,"extents":["0.5000 0.5000 0.5000","10.0000 10.0000 0.0000","2.5000 0.0000 2.5000"],"frame":50,"frame_ms":4.922,"materials":3,"mesh_entities":5,"meshes":10,"other_material":3,"visible":5},"raea":{"frame":58,"entities":533,"mesh_entities":5,"visible":5,"meshes":11,"materials":6,"batch_keys":2,"other_material":3,"extents":["0.5000 0.5000 0.5000","10.0000 0.0000 10.0000","2.5000 0.0000 2.5000"],"frame_ms":2.911,"step_ms":null,"cost_ms":2.911},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
+{"example":"shader/shader_prepass","frame":70,"ssim":0.997658,"tile":7,"bevy":{"batch_keys":2,"entities":465,"extents":["0.5000 0.5000 0.5000","10.0000 10.0000 0.0000","2.5000 0.0000 2.5000"],"frame":70,"frame_ms":4.821,"materials":3,"mesh_entities":5,"meshes":10,"other_material":3,"visible":5},"raea":{"frame":78,"entities":533,"mesh_entities":5,"visible":5,"meshes":11,"materials":6,"batch_keys":2,"other_material":3,"extents":["0.5000 0.5000 0.5000","10.0000 0.0000 10.0000","2.5000 0.0000 2.5000"],"frame_ms":2.659,"step_ms":null,"cost_ms":2.659},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
+{"example":"shader/shader_material_bindless","frame":10,"ssim":1.000000,"tile":0,"bevy":{"batch_keys":0,"entities":448,"extents":["0.5000 0.5000 0.5000"],"frame":10,"frame_ms":44.325,"materials":1,"mesh_entities":2,"meshes":7,"other_material":2,"visible":2},"raea":{"frame":18,"entities":520,"mesh_entities":2,"visible":2,"meshes":9,"materials":3,"batch_keys":0,"other_material":2,"extents":["0.5000 0.5000 0.5000"],"frame_ms":2.554,"step_ms":null,"cost_ms":2.554},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
+{"example":"shader/shader_material_2d_bindless","frame":10,"ssim":1.000000,"tile":0,"bevy":{"batch_keys":0,"entities":450,"extents":[],"frame":10,"frame_ms":44.048,"materials":1,"mesh_entities":0,"meshes":6,"other_material":0,"visible":0},"raea":{"frame":17,"entities":522,"mesh_entities":0,"visible":0,"meshes":11,"materials":1,"batch_keys":0,"other_material":0,"extents":[],"frame_ms":2.131,"step_ms":null,"cost_ms":2.131},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}
diff --git a/sdk/raea/bench/bevy-parity/shader/shader_material_2d_bindless.tsx b/sdk/raea/bench/bevy-parity/shader/shader_material_2d_bindless.tsx
new file mode 100644
index 00000000..e614a08d
--- /dev/null
+++ b/sdk/raea/bench/bevy-parity/shader/shader_material_2d_bindless.tsx
@@ -0,0 +1,37 @@
+// Bevy v0.20.0 examples/shader/shader_material_2d_bindless.rs in raea's TSX (docs/control.feature FC0a, FC2a): a
+// Camera2d and four default Rectangles scaled to 128 x 32 px at (+-128, +-128), each with the example's own Material2d,
+// assets/shaders/custom_material_2d_bindless.wesl as written: its color uniform (red, yellow, green, blue) times
+// Bevy's dark or light logo, AlphaMode2d::Mask(0.5). raea's Material isn't bindless, so the shader's @if(BINDLESS) set
+// compiles out and its @else set binds, as Bevy's does on a GPU without bindless. On Bevy's default clear colour, in
+// Bevy's default 1280 x 720 window.
+import { AbsoluteFill, Composition, registerRoot, staticFile } from "raea";
+import { Canvas3D } from "raea/3d";
+import { Transform } from "raea/transform";
+import { Mesh2d, Rectangle } from "raea/sprite";
+import { Material } from "@raea/render/bevy3d"; // raea/pbr once scene-loop lands (its pbr.ts commit)
+
+const DARK = staticFile("branding/bevy_logo_dark.png");
+const LIGHT = staticFile("branding/bevy_logo_light.png");
+const PARTS: [number, number, number[], string][] = [
+ [-1, -1, [1, 0, 0, 1], DARK],
+ [1, -1, [1, 1, 0, 1], LIGHT],
+ [-1, 1, [0, 1, 0, 1], DARK],
+ [1, 1, [0, 0, 1, 1], LIGHT],
+];
+
+function Shot() {
+ return (
+ <AbsoluteFill>
+ <Canvas3D layered clearColor="rgb(43, 44, 47)">
+ {PARTS.map(([x, y, color, logo], i) => (
+ <Mesh2d key={i} transform={Transform.fromXyz(x * 128, y * 128, 0).withScale([128, 32, 1])}>
+ <Rectangle />
+ <Material fragment={staticFile("shaders/custom_material_2d_bindless.wesl")} uniforms={{ material_color: { base_color: color } }} textures={{ material_color_texture: logo }} alpha_mode={{ Mask: 0.5 }} />
+ </Mesh2d>
+ ))}
+ </Canvas3D>
+ </AbsoluteFill>
+ );
+}
+
+registerRoot(() => <Composition id="main" component={Shot} durationInFrames={11} fps={60} width={1280} height={720} />);
diff --git a/sdk/raea/bench/bevy-parity/shader/shader_material_bindless.tsx b/sdk/raea/bench/bevy-parity/shader/shader_material_bindless.tsx
new file mode 100644
index 00000000..87f42266
--- /dev/null
+++ b/sdk/raea/bench/bevy-parity/shader/shader_material_bindless.tsx
@@ -0,0 +1,30 @@
+// Bevy v0.20.0 examples/shader/shader_material_bindless.rs in raea's TSX (docs/control.feature FC0a, FC2a): a 1 m cube
+// at (-2, 0.5, 0) and a default Cylinder at (2, 0.5, 0) with the example's own Material, assets/shaders/
+// bindless_material.wesl as written: its color uniform (LinearRgba::BLUE, ::RED) times a texture (Bevy's dark and
+// light logos). raea's Material isn't bindless, so the shader's @if(BINDLESS) set compiles out and its @else set binds,
+// as Bevy's does on a GPU without bindless. The camera at (-2, 2.5, 5), in Bevy's default 1280 x 720 window.
+import { Composition, registerRoot, staticFile } from "raea";
+import { Transform } from "raea/transform";
+import { Camera3d } from "raea/camera";
+import { Cuboid, Cylinder, Mesh3d } from "raea/mesh";
+import { Material } from "@raea/render/bevy3d"; // raea/pbr once scene-loop lands (its pbr.ts commit)
+
+const SHADER = staticFile("shaders/bindless_material.wesl");
+
+function Shot() {
+ return (
+ <>
+ <Mesh3d transform={Transform.fromXyz(-2, 0.5, 0)}>
+ <Cuboid half_size={[0.5, 0.5, 0.5]} />
+ <Material fragment={SHADER} uniforms={{ material_color: { base_color: [0, 0, 1, 1] } }} textures={{ material_color_texture: staticFile("branding/bevy_logo_dark.png") }} />
+ </Mesh3d>
+ <Mesh3d transform={Transform.fromXyz(2, 0.5, 0)}>
+ <Cylinder radius={0.5} half_height={0.5} />
+ <Material fragment={SHADER} uniforms={{ material_color: { base_color: [1, 0, 0, 1] } }} textures={{ material_color_texture: staticFile("branding/bevy_logo_light.png") }} />
+ </Mesh3d>
+ <Camera3d transform={Transform.fromXyz(-2, 2.5, 5).lookingAt([0, 0, 0])} />
+ </>
+ );
+}
+
+registerRoot(() => <Composition id="main" component={Shot} durationInFrames={11} fps={60} width={1280} height={720} />);
diff --git a/systems/mesh/src/lib.rs b/systems/mesh/src/lib.rs
index 91b91d27..498d14d9 100644
--- a/systems/mesh/src/lib.rs
+++ b/systems/mesh/src/lib.rs
@@ -267,7 +267,7 @@ pub fn box_uvs(pos: &[[f32; 3]], nor: &[[f32; 3]]) -> Vec<[f32; 2]> {
/// A mesh row's shape as a Bevy Mesh (docs/media.feature M2): a sphere alone is Bevy's Sphere::mesh() (icosphere or UV
-/// sphere) and a cuboid alone its Cuboid's (UVs a face each), as a Bevy Mesh3d's; a <BufferMesh> ("buffer:{positions,
+/// sphere), a cuboid alone its Cuboid's (UVs a face each) and a cylinder its Cylinder's, as a Bevy Mesh3d's; a <BufferMesh> ("buffer:{positions,
/// indices, normals, uvs, colors}") its own vertex buffers; anything else Manifold's, flat-shaded. `uvs` gives it
/// texture coordinates (a picture map, a grid's outline) and `tangents` tangents made from them (a normal map).
pub fn shape_mesh(id: &str, expr: &str, uvs: bool, tangents: bool) -> Result<Mesh, String> {
@@ -275,6 +275,7 @@ pub fn shape_mesh(id: &str, expr: &str, uvs: bool, tangents: bool) -> Result<Mes
raea_core_shape::SphereOf::Ico { radius, subdivisions } => Sphere::new(radius).mesh().ico(subdivisions).map_err(|e| format!("mesh {id}: {e}")),
raea_core_shape::SphereOf::Uv { radius, sectors, stacks } => Ok(Sphere::new(radius).mesh().uv(sectors, stacks)),
}).or_else(|| raea_core_shape::cuboid_of(expr).map(|[w, h, d]| Ok(Mesh::from(Cuboid::new(w, h, d)))))
+ .or_else(|| raea_core_shape::cylinder_of(expr).map(|(r, h)| Ok(Mesh::from(Cylinder::new(r, h)))))
// a plane alone: Bevy's one face, facing its normal (a box of no depth has two)
.or_else(|| raea_core_shape::plane_of(expr).map(|(n, [w, h])| Ok(Mesh::from(Plane3d::new(Vec3::from(n), Vec2::new(w / 2.0, h / 2.0))))));
if let Some(mut m) = ball.transpose()? {
diff --git a/systems/shader/src/ui_bind.rs b/systems/shader/src/ui_bind.rs
index f39e4212..74c4a29b 100644
--- a/systems/shader/src/ui_bind.rs
+++ b/systems/shader/src/ui_bind.rs
@@ -47,10 +47,12 @@ pub fn rebind_in(src: &str, groups: &[&str], what: &str, dims: bool) -> Result<R
let mut out = String::with_capacity(src.len());
let (mut uniforms, mut textures, mut samplers) = (Vec::new(), Vec::new(), 0usize);
let mut rest = src;
+ let dead = bindless_spans(src);
while let Some(i) = rest.find("@binding(") {
let line_start = rest[..i].rfind('\n').map_or(0, |n| n + 1);
- // a binding named in a comment is left alone
- if rest[line_start..i].contains("//") {
+ // a binding named in a comment is left alone, and one under @if(BINDLESS) (bindless_spans)
+ let at = src.len() - rest.len() + i;
+ if rest[line_start..i].contains("//") || dead.iter().any(|s| s.contains(&at)) {
out += &rest[..i + 1];
rest = &rest[i + 1..];
continue;
@@ -114,6 +116,27 @@ pub fn rebind_in(src: &str, groups: &[&str], what: &str, dims: bool) -> Result<R
Ok(Rebound { src: out, uniforms, textures, others, storages, samplers })
}
+/// The spans of `src` under `@if(BINDLESS)`: the `{ ... }` block it opens, or the one statement it marks. raea's
+/// materials aren't bindless (Bevy sets BINDLESS only for one that is), so these compile out, their bindings as written.
+fn bindless_spans(src: &str) -> Vec<std::ops::Range<usize>> {
+ let mut out = Vec::new();
+ for (i, m) in src.match_indices("@if(BINDLESS)") {
+ let after = i + m.len();
+ let at = after + (src[after..].len() - src[after..].trim_start().len());
+ let end = if src[at..].starts_with('{') {
+ let mut depth = 0i32;
+ src[at..].char_indices().find(|(_, c)| {
+ depth += match c { '{' => 1, '}' => -1, _ => 0 };
+ depth == 0
+ }).map(|(k, _)| at + k)
+ } else {
+ src[at..].find(';').map(|k| at + k)
+ };
+ out.extend(end.map(|e| i..e));
+ }
+ out
+}
+
/// The group a declaration's `@group(N)` names.
fn group(stmt: &str) -> Option<&str> {
let g = stmt.find("@group(")? + "@group(".len();
@@ -155,6 +178,26 @@ mod tests {
assert!(rebind("@group(1) @binding(0) var s: sampler;\n@group(1) @binding(1) var s2: sampler;\n@group(1) @binding(2) var t: texture_2d<f32>;").unwrap_err().contains("one each"));
}
+ #[test]
+ fn bindings_under_if_bindless_are_left_as_written() {
+ // Bevy's bindless_material.wesl: its bindless set compiles out (raea's Material isn't bindless), its @else set is bound
+ let src = "struct Color { base_color: vec4<f32> }
+@if(BINDLESS) {
+@group(3) @binding(0) var<storage> materials: array<u32>;
+@group(3) @binding(10) var<storage> material_color: binding_array<Color>;
+}
+@else {
+@group(3) @binding(0) var<uniform> material_color: Color;
+@group(3) @binding(1) var t: texture_2d<f32>;
+@group(3) @binding(2) var s: sampler;
+}
+fn f() { @if(BINDLESS) let x = 1; }
+";
+ let r = rebind_in(src, &["3"], "a Material", true).unwrap();
+ assert_eq!((r.uniforms, r.textures, r.storages.len()), (vec![("material_color".to_string(), "Color".to_string())], vec!["t".to_string()], 0));
+ assert!(r.src.contains("@binding(10) var<storage> material_color") && r.src.contains("@binding(30) var<uniform> material_color"));
+ }
+
#[test]
fn a_materials_other_dimensions_go_to_their_slots_and_its_samplers_in_order() {
// Bevy's fallback_image_test.wesl: a texture of each dimension, each with its sampler