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.
TypeScript 3dagent-skillsai-agentsai-videobevyclaude-codegame-enginegpulinuxmacosmotion-designmotion-graphicsreactrusttypescriptvideo-editingvideo-renderingwgpuwindows
Bevy parity: shader_advanced/manual_material, exact
shinyobjectz9a6f3d7358ff
diff --git a/bench/bevy-parity/examples.list b/bench/bevy-parity/examples.listindex c1f2e16d..099f2a4c 100644--- a/bench/bevy-parity/examples.list+++ b/bench/bevy-parity/examples.list@@ -146,3 +146,4 @@ shader_advanced/fullscreen_materialshader_advanced/custom_render_phaseshader_advanced/custom_shader_instancingshader_advanced/deferred_raymarch+shader_advanced/manual_materialdiff --git a/bench/bevy-parity/runs.tsv b/bench/bevy-parity/runs.tsvindex 8eec2bc3..ebd66400 100644--- a/bench/bevy-parity/runs.tsv+++ b/bench/bevy-parity/runs.tsv@@ -145,3 +145,4 @@ shader_advanced/fullscreen_material - 10,30,60shader_advanced/custom_render_phase - 5,10shader_advanced/custom_shader_instancing - 5,10shader_advanced/deferred_raymarch - 5,10,30+shader_advanced/manual_material - 5,10,30diff --git a/docs/bevy-parity.md b/docs/bevy-parity.mdindex 2c9582b7..897d085b 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 andframe time at most 1.25x the example's). Wall time is one machine's, measured in the same run.-Examples: **438**, ported **146**, passing **146**, excluded **17** (docs/bevy-parity/excluded.tsv), left **275**.+Examples: **438**, ported **147**, passing **147**, excluded **17** (docs/bevy-parity/excluded.tsv), left **274**.raea's frame ms is its update's plus the time React takes to step a frame for its 3D (step), which the exampledoesn't pay.@@ -239,6 +239,9 @@ doesn't pay.| shader_advanced/deferred_raymarch | 10 | 1.000000 | 0 | 2 / 2 | 445 / 530 | 7 / 9 | 3 / 3 | 4.989 / 6.005 = 6.005 + 0 | yes | || shader_advanced/deferred_raymarch | 30 | 1.000000 | 0 | 2 / 2 | 443 / 530 | 7 / 9 | 3 / 3 | 5.479 / 3.62 = 3.62 + 0 | yes | || shader_advanced/deferred_raymarch | 5 | 1.000000 | 0 | 2 / 2 | 443 / 530 | 7 / 9 | 3 / 3 | 59.743 / 8.363 = 8.363 + 0 | yes | |+| shader_advanced/manual_material | 10 | 1.000000 | 0 | 0 / 0 | 448 / 526 | 6 / 8 | 1 / 2 | 2.824 / 2.925 = 2.925 + 0 | yes | |+| shader_advanced/manual_material | 30 | 1.000000 | 0 | 0 / 0 | 448 / 526 | 6 / 8 | 1 / 2 | 2.425 / 1.489 = 1.489 + 0 | yes | |+| shader_advanced/manual_material | 5 | 1.000000 | 0 | 0 / 0 | 448 / 526 | 6 / 8 | 1 / 2 | 39.949 / 3.358 = 3.358 + 0 | yes | |## Excludeddiff --git a/docs/bevy-parity/results.jsonl b/docs/bevy-parity/results.jsonlindex 8faf30ce..23ce5ea2 100644--- a/docs/bevy-parity/results.jsonl+++ b/docs/bevy-parity/results.jsonl@@ -226,3 +226,6 @@{"example":"shader_advanced/deferred_raymarch","frame":10,"ssim":1.000000,"tile":0,"bevy":{"batch_keys":2,"entities":445,"extents":["0.6000 0.6000 0.6000","10.0000 0.0000 10.0000"],"frame":10,"frame_ms":4.989,"materials":3,"mesh_entities":2,"meshes":7,"other_material":0,"visible":2},"raea":{"frame":17,"entities":530,"mesh_entities":2,"visible":2,"meshes":9,"materials":3,"batch_keys":2,"other_material":0,"extents":["0.6000 0.6000 0.6000","10.0000 0.0000 10.0000"],"frame_ms":6.005,"step_ms":null,"cost_ms":6.005},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}{"example":"shader_advanced/deferred_raymarch","frame":30,"ssim":1.000000,"tile":0,"bevy":{"batch_keys":2,"entities":443,"extents":["0.6000 0.6000 0.6000","10.0000 0.0000 10.0000"],"frame":30,"frame_ms":5.479,"materials":3,"mesh_entities":2,"meshes":7,"other_material":0,"visible":2},"raea":{"frame":37,"entities":530,"mesh_entities":2,"visible":2,"meshes":9,"materials":3,"batch_keys":2,"other_material":0,"extents":["0.6000 0.6000 0.6000","10.0000 0.0000 10.0000"],"frame_ms":3.62,"step_ms":null,"cost_ms":3.62},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}{"example":"shader_advanced/deferred_raymarch","frame":5,"ssim":1.000000,"tile":0,"bevy":{"batch_keys":2,"entities":443,"extents":["0.6000 0.6000 0.6000","10.0000 0.0000 10.0000"],"frame":5,"frame_ms":59.743,"materials":3,"mesh_entities":2,"meshes":7,"other_material":0,"visible":2},"raea":{"frame":12,"entities":530,"mesh_entities":2,"visible":2,"meshes":9,"materials":3,"batch_keys":2,"other_material":0,"extents":["0.6000 0.6000 0.6000","10.0000 0.0000 10.0000"],"frame_ms":8.363,"step_ms":null,"cost_ms":8.363},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}+{"example":"shader_advanced/manual_material","frame":10,"ssim":1.000000,"tile":0,"bevy":{"batch_keys":0,"entities":448,"extents":["1.0000 1.0000 1.0000"],"frame":10,"frame_ms":2.824,"materials":1,"mesh_entities":1,"meshes":6,"other_material":1,"visible":1},"raea":{"frame":18,"entities":526,"mesh_entities":1,"visible":1,"meshes":8,"materials":2,"batch_keys":0,"other_material":1,"extents":["1.0000 1.0000 1.0000"],"frame_ms":2.925,"step_ms":null,"cost_ms":2.925},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}+{"example":"shader_advanced/manual_material","frame":30,"ssim":1.000000,"tile":0,"bevy":{"batch_keys":0,"entities":448,"extents":["1.0000 1.0000 1.0000"],"frame":30,"frame_ms":2.425,"materials":1,"mesh_entities":1,"meshes":6,"other_material":1,"visible":1},"raea":{"frame":38,"entities":526,"mesh_entities":1,"visible":1,"meshes":8,"materials":2,"batch_keys":0,"other_material":1,"extents":["1.0000 1.0000 1.0000"],"frame_ms":1.489,"step_ms":null,"cost_ms":1.489},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}+{"example":"shader_advanced/manual_material","frame":5,"ssim":1.000000,"tile":0,"bevy":{"batch_keys":0,"entities":448,"extents":["1.0000 1.0000 1.0000"],"frame":5,"frame_ms":39.949,"materials":1,"mesh_entities":1,"meshes":6,"other_material":1,"visible":1},"raea":{"frame":13,"entities":526,"mesh_entities":1,"visible":1,"meshes":8,"materials":2,"batch_keys":0,"other_material":1,"extents":["1.0000 1.0000 1.0000"],"frame_ms":3.358,"step_ms":null,"cost_ms":3.358},"pixels":true,"draws":true,"time":true,"pass":true,"why":""}diff --git a/sdk/raea/bench/bevy-parity/shader_advanced/manual_material.tsx b/sdk/raea/bench/bevy-parity/shader_advanced/manual_material.tsxnew file mode 100644index 00000000..829176f0--- /dev/null+++ b/sdk/raea/bench/bevy-parity/shader_advanced/manual_material.tsx@@ -0,0 +1,33 @@+// Bevy v0.20.0 examples/shader_advanced/manual_material.rs in raea's TSX (docs/control.feature FC2d): an ImageMaterial+// prepared by hand (ErasedRenderAsset) rather than by the Material trait, drawn in Opaque3d with+// assets/shaders/manual_material.wesl as written, its two bindings the Bevy logo and a sampler from+// SamplerDescriptor::default() (wgpu's: nearest filtering, nearest mipmaps and clamp to edge, over the image's own+// sampler). A 2 m cube at (0, 0.5, 0), a shadow-casting PointLight at (4, 8, 4) at Bevy's default intensity (the+// shader is unlit, so it doesn't show), and the camera at (-2.5, 4.5, 9) looking at the origin, 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 { PointLight } from "raea/light";+import { Cuboid, Mesh3d } from "raea/mesh";+import { Material } from "@raea/render/bevy3d";++const DEFAULT_SAMPLER = { filter: "nearest", mipmap: "nearest", wrap: "clamp" } as const;++function Shot() {+ return (+ <>+ <Mesh3d transform={Transform.fromXyz(0, 0.5, 0)}>+ <Cuboid half_size={[1, 1, 1]} />+ <Material+ fragment={staticFile("shaders/manual_material.wesl")}+ textures={{ material_color_texture: { src: staticFile("branding/icon.png"), sampler: DEFAULT_SAMPLER } }}+ />+ </Mesh3d>+ <PointLight shadow_maps_enabled transform={Transform.fromXyz(4, 8, 4)} />+ <Camera3d transform={Transform.fromXyz(-2.5, 4.5, 9).lookingAt([0, 0, 0])} />+ </>+ );+}++registerRoot(() => <Composition id="main" component={Shot} durationInFrames={31} fps={60} width={1280} height={720} />);