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
Ink outlines compile under FXC, DX12's shader compiler on Windows (#66): the wide line's 16 directions at three radii are one loop of 48, since FXC can't unroll two nested loops with a return inside them (X3511, 172 iterations) and every 3D scene builds this pipeline, so on DX12 its error stopped every 3D render (the blocks example drew its floor and one box). Checked with naga 30's HLSL as wgpu gives FXC (shader model 5.1, loops bounded) and Windows Kits 10.0.22621's fxc on cuda-box: the old shader fails as the issue says, the new one compiles; the filter passes, froxel min/max, traced AO and shadow-only compile too
shinyobjectz85adac169774
diff --git a/systems/post/src/outline.wesl b/systems/post/src/outline.weslindex d812dc17..19d1b0ae 100644--- a/systems/post/src/outline.wesl+++ b/systems/post/src/outline.wesl@@ -72,21 +72,21 @@ fn fragment(in: FullscreenVertexOutput) -> @location(0) vec4<f32> {}// A line `width` pixels wide and even (a cartoon's): a silhouette wherever something within the width's radius is farther by the threshold (so the line lies on the nearer side, ringing the figure), a crease wherever the-// surface within the radius on one side (right and down) turns by more than `normal`. 16 directions at three radii.+// surface within the radius on one side (right and down) turns by more than `normal`. 16 directions at three radii, in+// one loop: FXC, DX12's shader compiler on Windows, can't unroll two nested loops with a return inside them, and every+// 3D scene builds this pipeline, so its error stopped every 3D render on DX12 (#66).fn wide(c: vec2<i32>, z: f32, n: vec3<f32>, here: vec4<f32>, ink: vec4<f32>) -> vec4<f32> {let r = p.width;- for (var k = 0; k < 16; k++) {- let a = f32(k) * 0.39269908;+ for (var i = 0u; i < 48u; i++) {+ let a = f32(i / 3u) * 0.39269908;let d = vec2<f32>(cos(a), sin(a));- for (var j = 1; j <= 3; j++) {- let o = c + vec2<i32>(round(d * r * f32(j) / 3.0));- let zo = dist(o);- if zo - z > p.depth * z {- return ink;- }- if p.normal > 0.0 && (d.x + d.y) > 0.0 && !skipped(o) && zo < 1e6 && z < 1e6 && abs(zo - z) < p.depth * z && 1.0 - dot(n, normal_at(o)) > p.normal {- return ink;- }+ let o = c + vec2<i32>(round(d * r * f32(i % 3u + 1u) / 3.0));+ let zo = dist(o);+ if zo - z > p.depth * z {+ return ink;+ }+ if p.normal > 0.0 && (d.x + d.y) > 0.0 && !skipped(o) && zo < 1e6 && z < 1e6 && abs(zo - z) < p.depth * z && 1.0 - dot(n, normal_at(o)) > p.normal {+ return ink;}}return here;