diff --git a/research/rendering/fractal-reference-oracles.md b/research/rendering/fractal-reference-oracles.md index 7e42cab..8d38a2e 100644 --- a/research/rendering/fractal-reference-oracles.md +++ b/research/rendering/fractal-reference-oracles.md @@ -151,7 +151,8 @@ kind of embarrassing: ``` First receipt after adding the JWildfire `variationGroup`/coefficient-layout -slice and the `disc`, `julian`, and `gaussian_blur` variation subset: +slice and the `disc`, `julian`, and `gaussian_blur` variation subset, before +lowering `post`: - GPU time: `66.446 ms/frame`, `15.0 FPS` equivalent - visual score: `5.01%` @@ -188,19 +189,36 @@ sample history instead of starting every splat from zero. That import report now exists. GPU and histogram flame receipts emit a sibling `fractal-flame-import-report-*.json` next to the numeric receipt. For the -JWildfire selftest flame, the first report says: +JWildfire selftest flame, the first report after `post` lowering says: -- accepted fields: `14` +- accepted fields: `15` - approximated fields: `3` - ignored fields: `45` -- rejected fields: `12` -- rejected geometry/sampling losses: non-identity `post` on the julian xform - and `wfield_*` weighting-field attributes on the disc xform +- rejected fields: `11` +- rejected geometry/sampling losses: `wfield_*` weighting-field attributes on + the disc xform This report is the next expansion gate. A flame may parse successfully and still be a bad import; unsupported fields must stay visible until the DSL, compiler, or renderer can actually own them. +Lowering `post` required expanding only the small authored-program transform +row, not the resident million-splat or reservoir packets. The closer +CPU/GPU-slice receipt now gives: + +- bounds `-8,-8,8,8`: `84.19%` GPU-vs-Aquarium-CPU slice score at + `129.073 ms/frame` +- bounds `-128,-128,128,128`: `88.01%` GPU-vs-Aquarium-CPU slice score at + `129.404 ms/frame` +- artifact: + `artifacts/fractal-jwildfire-faceplant/jwildfire-vs-aquarium-post-close.png` + +This is not external JWildfire visual parity. It says Aquarium's GPU path is +now much closer to Aquarium's CPU interpretation of the supported slice. The +image is still missing JWildfire's palette, density estimation, weighting-field +behavior, render filters, and likely more dialect detail. The speed is also +unacceptable for realtime because depth-64 replay is the wrong execution model. + ## GPU Flame Receipt The flame fixture can now drive the D3D12 reservoir receipt directly: diff --git a/src/Aquarium.Engine.Contracts/Fractal/AquariumFractalContracts.cs b/src/Aquarium.Engine.Contracts/Fractal/AquariumFractalContracts.cs index 07de2ff..df7d68c 100644 --- a/src/Aquarium.Engine.Contracts/Fractal/AquariumFractalContracts.cs +++ b/src/Aquarium.Engine.Contracts/Fractal/AquariumFractalContracts.cs @@ -174,7 +174,9 @@ public readonly record struct AquariumPackedFractalIfsTransform( Vector4 OffsetScaleAmplitude, Vector4 RadiiRotationFalloff, Vector4 MaterialSeedShape, - Vector4 TileAddress); + Vector4 TileAddress, + Vector4 PostMatrix, + Vector4 PostTranslation); [StructLayout(LayoutKind.Sequential)] public readonly record struct AquariumPackedSdfEnvelopeReservoir( diff --git a/src/Aquarium.Engine.Fractal/Grammar/FractalFlameDefinition.cs b/src/Aquarium.Engine.Fractal/Grammar/FractalFlameDefinition.cs index 402d999..057b30b 100644 --- a/src/Aquarium.Engine.Fractal/Grammar/FractalFlameDefinition.cs +++ b/src/Aquarium.Engine.Fractal/Grammar/FractalFlameDefinition.cs @@ -79,6 +79,8 @@ public readonly record struct FractalFlameTransform2D( string Name, Vector4 Matrix, Vector2 Translation, + Vector4 PostMatrix, + Vector2 PostTranslation, float Weight, float Color, FractalFlameVariationWeights Variations) @@ -93,7 +95,10 @@ public readonly record struct FractalFlameTransform2D( var affine = new Vector2( (Matrix.X * point.X) + (Matrix.Y * point.Y) + Translation.X, (Matrix.Z * point.X) + (Matrix.W * point.Y) + Translation.Y); - return Variations.HasAny ? Variations.Apply(affine, random) : affine; + var varied = Variations.HasAny ? Variations.Apply(affine, random) : affine; + return new Vector2( + (PostMatrix.X * varied.X) + (PostMatrix.Y * varied.Y) + PostTranslation.X, + (PostMatrix.Z * varied.X) + (PostMatrix.W * varied.Y) + PostTranslation.Y); } } diff --git a/src/Aquarium.Engine.Fractal/Grammar/FractalFlameFileParser.cs b/src/Aquarium.Engine.Fractal/Grammar/FractalFlameFileParser.cs index 36f8aaa..e5e22f3 100644 --- a/src/Aquarium.Engine.Fractal/Grammar/FractalFlameFileParser.cs +++ b/src/Aquarium.Engine.Fractal/Grammar/FractalFlameFileParser.cs @@ -62,6 +62,17 @@ public static class FractalFlameFileParser var translation = isJWildfireDialect ? new Vector2(coefs[4], coefs[5]) : new Vector2(coefs[2], coefs[5]); + var post = ParseOptionalFloatList((string?)element.Attribute("post"), expectedCount: 6); + var postMatrix = post is null + ? new Vector4(1.0f, 0.0f, 0.0f, 1.0f) + : isJWildfireDialect + ? new Vector4(post[0], post[2], post[1], post[3]) + : new Vector4(post[0], post[1], post[3], post[4]); + var postTranslation = post is null + ? Vector2.Zero + : isJWildfireDialect + ? new Vector2(post[4], post[5]) + : new Vector2(post[2], post[5]); var variations = new FractalFlameVariationWeights( ParseOptionalFloat(variationSource, "linear", 0.0f) + ParseOptionalFloat(variationSource, "normal", 0.0f), ParseOptionalFloat(variationSource, "spherical", 0.0f), @@ -79,6 +90,8 @@ public static class FractalFlameFileParser transformName, matrix, translation, + postMatrix, + postTranslation, ParseOptionalFloat(element, "weight", 1.0f), ParseOptionalFloat(element, "color", 0.0f), variations); @@ -116,6 +129,13 @@ public static class FractalFlameFileParser return values; } + private static float[]? ParseOptionalFloatList(string? source, int expectedCount) + { + return string.IsNullOrWhiteSpace(source) + ? null + : ParseFloatList(source, expectedCount, "optional float list"); + } + private static IReadOnlyList BuildFlameFieldReports(XElement flame) { var structural = new HashSet(StringComparer.Ordinal) @@ -209,15 +229,7 @@ public static class FractalFlameFileParser if (name is "post") { - if (IsIdentityPost(attribute.Value)) - { - ignored.Add("post=identity"); - } - else - { - rejected.Add("post"); - } - + accepted.Add(IsIdentityPost(attribute.Value) ? "post=identity" : "post"); continue; } diff --git a/src/Aquarium.Engine.Fractal/Lod/FractalGpuProgramCompiler.cs b/src/Aquarium.Engine.Fractal/Lod/FractalGpuProgramCompiler.cs index 2bba37a..befbc7f 100644 --- a/src/Aquarium.Engine.Fractal/Lod/FractalGpuProgramCompiler.cs +++ b/src/Aquarium.Engine.Fractal/Lod/FractalGpuProgramCompiler.cs @@ -65,7 +65,9 @@ public static class FractalGpuProgramCompiler transform.Matrix, new Vector4(transform.Translation, transform.Variations.Linear, transform.Variations.Spherical), new Vector4(transform.Variations.Bubble, MathF.Max(transform.Weight, 0.0f), transform.Color, transform.Variations.JulianDist), - new Vector4(transform.Variations.Disc, transform.Variations.Julian, transform.Variations.JulianPower, transform.Variations.GaussianBlur)); + new Vector4(transform.Variations.Disc, transform.Variations.Julian, transform.Variations.JulianPower, transform.Variations.GaussianBlur), + transform.PostMatrix, + new Vector4(transform.PostTranslation, 0.0f, 0.0f)); } private static AquariumPackedFractalIfsTransform Pack( @@ -85,7 +87,9 @@ public static class FractalGpuProgramCompiler new Vector4(claim.Center, radius, claim.Amplitude), new Vector4(claim.Radii, claim.RotationRadians, claim.Falloff), new Vector4(material, claim.Seed, rotationCos, rotationSin), - tileAddress); + tileAddress, + new Vector4(1.0f, 0.0f, 0.0f, 1.0f), + Vector4.Zero); } private static float StableUnit(string tags, int seed) diff --git a/src/Aquarium.Engine/Render/Shaders/D3D12FractalReservoirCompute.hlsl b/src/Aquarium.Engine/Render/Shaders/D3D12FractalReservoirCompute.hlsl index f04e02b..2b8a0fb 100644 --- a/src/Aquarium.Engine/Render/Shaders/D3D12FractalReservoirCompute.hlsl +++ b/src/Aquarium.Engine/Render/Shaders/D3D12FractalReservoirCompute.hlsl @@ -37,6 +37,8 @@ struct FractalIfsTransform float4 radiiRotationFalloff; float4 materialSeedShape; float4 tileAddress; + float4 postMatrix; + float4 postTranslation; }; cbuffer ReceiptConstants : register(b0) @@ -184,6 +186,11 @@ float3 FractalPoint(uint index, out float radius) nextPoint += blurRadius * float2(cos(blurAngle), sin(blurAngle)); } + float4 post = transform.postMatrix; + float2 postT = transform.postTranslation.xy; + nextPoint = float2( + (post.x * nextPoint.x) + (post.y * nextPoint.y) + postT.x, + (post.z * nextPoint.x) + (post.w * nextPoint.y) + postT.y); p = nextPoint; material = transform.materialSeedShape.z; support *= saturate(max(length(m.xy), length(m.zw))); diff --git a/state/map.yaml b/state/map.yaml index 18703a4..c31fe31 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -154,8 +154,8 @@ renderer_state: - View-conditioned visual parity now scores named camera windows instead of trusting one global histogram. For the depth-16 flame receipt, global -8..8 scores 97.09%, mid -1..1 scores 91.93%, close -0.5..0.5 scores 88.97%, and micro -0.25..0.25 scores 82.05% with 2,656 starved reference bins and 17.95% underrepresented mass. This is the current hard loss: the reservoir is not yet spending work based on camera-conditioned underrepresentation. - High-reference flame contact sheets should use at least 20M CPU oracle samples for visual judgment. The current artifact is artifacts/fractal-contact-sheet-hq/flame-parity-contact-sheet-hq.png, comparing 20M CPU oracle histograms against 250k Aquarium GPU readback samples for global frame 1/10 and zoom frame 1/10. The 1M-sample oracle was too noisy and should be treated as a scalar smoke check only. - External flame visual references are now reproducible from ignored local artifacts. scripts/install-flame-reference-tools.ps1 hydrates JWildfire 9.00 plus Temurin JRE 17 under artifacts/reference-tools; scripts/fractal-flame-jwildfire-reference.ps1 prefers JWildfire's bundled FARenderJWF GPU renderer for explicit PNG output. Local GTX 1070 smoke rendered FARender's selftest.flame at 1024x1024 quality 2000 in 7.69 sec to artifacts/fractal-flame-jwildfire-reference/selftest-farender-20260520-233638.png. JWildfire/FARender is a visual reference artifact lane, not Aquarium runtime code. - - JWildfire selftest flame is the current honest faceplant target. After adding a first dialect slice for JWildfire coefficient layout, variationGroup, disc, julian, and gaussian_blur, the depth-64 GTX 1070 receipt against artifacts/reference-tools/j-wildfire-9.00/lib/FARenderJWF/selftest.flame reaches only 5.01% visual score / 3.04% occupancy overlap at 66.446 ms/frame. This proves the renderer needs a richer flame AST/translation report and persistent GPU iteration-state reservoirs; brute replaying deep flame iteration from zero per splat is not the final hot path. - - FractalFlameFileParser now has ParseFirstWithReport for import accountability. Receipt runs emit fractal-flame-import-report-*.json beside flame histogram/GPU receipts. The JWildfire selftest report currently records 14 accepted fields, 3 approximations, 45 ignored render/presentation fields, and 12 rejected geometry/sampling fields: non-identity post plus wfield_* weighting-field attributes. Successful XML parsing is not successful translation. + - JWildfire selftest flame is the current honest faceplant target. After adding a first dialect slice for JWildfire coefficient layout, variationGroup, disc, julian, gaussian_blur, and post transforms, the depth-64 GTX 1070 receipt against Aquarium's CPU interpretation of artifacts/reference-tools/j-wildfire-9.00/lib/FARenderJWF/selftest.flame reaches 84.19% score in bounds -8..8 and 88.01% in bounds -128..128, but costs about 129 ms/frame. This is CPU/GPU slice parity, not external JWildfire visual parity. It proves the remaining hard work is richer dialect semantics plus persistent GPU iteration-state reservoirs; brute replaying deep flame iteration from zero per splat is not the final hot path. + - FractalFlameFileParser now has ParseFirstWithReport for import accountability. Receipt runs emit fractal-flame-import-report-*.json beside flame histogram/GPU receipts. The JWildfire selftest report currently records 15 accepted fields, 3 approximations, 45 ignored render/presentation fields, and 11 rejected geometry/sampling fields: wfield_* weighting-field attributes. Successful XML parsing is not successful translation. - D3D12 capacity logging now reports active fractal reservoir resident MiB, splat count, visible debug splat count, updates/pass, and candidates/update so the GPU cache has a receipt in normal runtime logs, not just in the standalone benchmark. - The consolidated fractal brush architecture plan defines the intended pipeline: client intent -> domain roots -> semantic IFS brush grammar -> ownership tree -> node summaries -> contribution cache/residency scheduler -> backend packets -> renderer passes -> debug/evidence, with explicit module boundaries and mockable unit-test seams. - The Perfect Machine architecture lives in docs/perfect-machine-architecture.md. It is the current waterfall design authority for fast 2D SDF splats, 3D SDF splats, 2D-projected-to-3D surface splats, IFS `.aquageo` structural probes, Mimir-style camera/audio evidence candidates, ReSTIR/GRIS reservoir reuse, heuristic occupancy graph updates, resource-tier residency, and TAA guide-buffer integration. @@ -194,7 +194,7 @@ next_actions: - Follow docs/perfect-machine-architecture.md before expanding SDF splat backends, sensor-fusion candidate adapters, reservoir guide buffers, occupancy graph state, or stochastic learned priority. - Use research/rendering/fractal-brush-implementation-roadmap.md as the actionable execution checklist for fractal brush work. - Next flame reference slice: build a JWildfire import/lowering report that separates supported, approximated, ignored, and rejected variation fields before expanding the GPU op set. Do not hide dialect loss behind successful XML parsing. - - Next flame renderer slice: lower non-identity post transforms and decide whether weighting fields become explicit DSL operator nodes or rejected importer-only diagnostics. Do not fold them into anonymous variation weights. + - Next flame renderer slice: decide whether weighting fields become explicit DSL operator nodes or rejected importer-only diagnostics, then replace brute depth replay with persistent GPU flame iteration-state reservoirs. Do not fold weighting fields into anonymous variation weights. - Follow docs/zyphos-eusocial-sync.md and E:\Projects\Eusocial Interbeing\Eusocial Interbeing\World\Zyphos Simulation Brief.md before turning Zyphos visual choices into setting claims. - Follow docs/tsr-inspired-taa-spec.md when changing current temporal diagnostics. - Use docs/temporal-sdf-gaussian-field.md before wiring LocalCastBridge visual sensor fusion into Aquarium or scaling the temporal Gaussian renderer beyond the current bounded instanced pass. diff --git a/state/memory.json b/state/memory.json index 1359821..d7da40b 100644 --- a/state/memory.json +++ b/state/memory.json @@ -112,8 +112,8 @@ "Global flame parity is not enough. View-conditioned parity now scores named viewport bounds and reports GPU/reference hits, starved reference bins, and underrepresented mass. First depth-16 GTX 1070 receipt with 250k GPU readback splats vs 1M CPU samples: global -8..8 scores 97.09%, mid -1..1 scores 91.93%, close -0.5..0.5 scores 88.97%, micro -0.25..0.25 scores 82.05% with 2,656 starved bins and 17.95% underrepresented mass. This proves the current reservoir is fast but not view-adaptive; next work needs camera-conditioned target weights and underrepresented-region feedback.", "Do not use the quick 1M-sample flame oracle image for visual judgment; it is too noisy. The high-reference contact sheet uses 20,000,000 CPU oracle samples and 250,000 Aquarium GPU readback splats per panel at artifacts/fractal-contact-sheet-hq/flame-parity-contact-sheet-hq.png. It makes the zoom failure legible: the CPU oracle smooths out while Aquarium remains under-sampled after zoom because the current reservoir is not view-adaptive.", "Aquarium's CPU flame histogram is a math oracle, not visual ground truth. The visual reference ladder is: Chaotica as gold market-quality reference when available/imported, JWildfire/FARender as scriptable visual reference, FLAM3/Apophysis as portable baseline compatibility, Aquarium CPU as deterministic unit-test/debug oracle only. On 2026-05-20 Chaotica and flam3-render were not on PATH, but scripts/install-flame-reference-tools.ps1 hydrated JWildfire 9.00 plus Temurin JRE 17 under ignored artifacts, and scripts/fractal-flame-jwildfire-reference.ps1 rendered JWildfire's bundled FARenderJWF selftest flame at 1024x1024 quality 2000 in 7.69 sec on the GTX 1070. JWildfire/FARender is an external visual reference artifact lane, not Aquarium runtime code. Do not claim best-in-market flame parity until imported Chaotica renders or fully matched JWildfire flame dialect metrics are wired into residual scoring.", - "JWildfire selftest is now the flame renderer faceplant target. A first dialect slice supports JWildfire coefficient layout, variationGroup, disc, julian, and gaussian_blur; the depth-64 GTX 1070 receipt still scores only 5.01% visual parity / 3.04% occupancy overlap at 66.446 ms/frame. This is a DSL/translation/hot-path failure, not just a sample-count problem: Aquarium needs a richer flame AST with explicit accepted/approximated/ignored/rejected field reports, GPU variation op rows, and persistent per-sample iteration-state reservoirs instead of replaying deep chaos-game ancestry from zero for every splat.", - "Flame imports must report translation loss. FractalFlameFileParser.ParseFirstWithReport returns accepted, approximated, ignored, and rejected fields per transform, and receipt runs write fractal-flame-import-report-*.json. The JWildfire selftest report currently shows 14 accepted fields, 3 approximations, 45 ignored render/presentation fields, and 12 rejected geometry/sampling fields: non-identity post plus wfield_* weighting-field attributes. Treat successful XML parsing as insufficient until rejected geometry fields are either implemented as DSL/operator nodes or explicitly accepted as out-of-scope diagnostics.", + "JWildfire selftest is now the flame renderer faceplant target. The current dialect slice supports JWildfire coefficient layout, variationGroup, disc, julian, gaussian_blur, and post transforms. After post lowering, the depth-64 GTX 1070 receipt scores 84.19% against Aquarium's CPU slice oracle in bounds -8..8 and 88.01% in bounds -128..128, but costs about 129 ms/frame. This is not external JWildfire visual parity; it is CPU/GPU agreement on the supported slice. Aquarium still needs richer dialect semantics, palette/density/render-filter parity, weighting-field handling, and persistent per-sample GPU iteration-state reservoirs instead of replaying deep chaos-game ancestry from zero for every splat.", + "Flame imports must report translation loss. FractalFlameFileParser.ParseFirstWithReport returns accepted, approximated, ignored, and rejected fields per transform, and receipt runs write fractal-flame-import-report-*.json. The JWildfire selftest report currently shows 15 accepted fields, 3 approximations, 45 ignored render/presentation fields, and 11 rejected geometry/sampling fields: wfield_* weighting-field attributes. Treat successful XML parsing as insufficient until rejected geometry fields are either implemented as DSL/operator nodes or explicitly accepted as out-of-scope diagnostics.", "Zyphos' primary planetary terrain test path is now the fractal reservoir surface. The direct SDF planet and Umbros proxy shaders are removed from the render plan; only the parent star remains as a direct SDF body/light. If the planet looks wrong, fix the reservoir lowering/shading path instead of letting the old SDF terrain hide it.", "The GPU splat receipt harness lives at tools/Aquarium.Fractal.Receipt and scripts/fractal-splat-receipt.ps1. The live receipt allocates one 80-byte packed SDF splat UAV plus three distinct 64-byte reservoir UAVs for SDF envelopes, PBR material envelopes, and radiosity; those reservoirs are sampled in independent compute passes under a stochastic update budget. On the local NVIDIA GTX 1070 it kept 2,000,000 splats and 2,000,000 reservoirs per layer resident. The fallback hash-fractal receipt updated 50,000 entries per layer with 2 candidates/update at 4.471 ms/frame, 223.7 FPS equivalent. The authored precomposed selected-cut receipt used depth 48, 4 compact transforms, and 15,000 updates per layer at 4.908 ms/frame, 203.7 FPS equivalent, with full reservoir coverage in 133.3 frames. D3D12FractalSplatRender consumes the raw splat, SDF, PBR, and radiosity buffers through separate graphics SRVs for the visible debug subset. This proves compute-side GPU residency, budgeted temporal convergence, authored-program splat population decoupled from domain ancestry depth, and first layered GPU consumption; final terrain/material/radiosity shading is still future work.", "FractalProjectedSdfSplatCompiler is the Phase G 2D-projected-to-3D lowering seam: it converts resident SignedDistance2D page payload samples into compact 3D SDF splats through an explicit page-local Vector2 -> Vector3 mapping, surface normal, support radius, and splat budget. Zyphos caches a bounded first set with a flat local mapping until cube-sphere/torus mappers are added.", diff --git a/tests/Aquarium.Engine.Fractal.Tests/ApophysisReferenceParityTests.cs b/tests/Aquarium.Engine.Fractal.Tests/ApophysisReferenceParityTests.cs index ddb8166..3bce162 100644 --- a/tests/Aquarium.Engine.Fractal.Tests/ApophysisReferenceParityTests.cs +++ b/tests/Aquarium.Engine.Fractal.Tests/ApophysisReferenceParityTests.cs @@ -127,11 +127,13 @@ public sealed class ApophysisReferenceParityTests Assert.Equal(5.0f, flame.Transforms[0].Variations.JulianPower); Assert.Equal(1.25f, flame.Transforms[0].Variations.JulianDist); Assert.Equal(0.02f, flame.Transforms[0].Variations.GaussianBlur); + Assert.Equal(new Vector4(0.9f, 0.0f, 0.0f, 0.9f), flame.Transforms[0].PostMatrix); Assert.Equal(new Vector4(0.25f, 0.75f, -0.75f, 0.25f), flame.Transforms[1].Matrix); Assert.Equal(0.8f, flame.Transforms[1].Variations.Disc); Assert.Contains("variation:normal -> linear", result.Report.Transforms[0].ApproximatedFields); Assert.Contains("variation:jwf_gaussian_blur -> stochastic gaussian_blur", result.Report.Transforms[0].ApproximatedFields); - Assert.Contains("post", result.Report.Transforms[0].RejectedFields); + Assert.Contains("post", result.Report.Transforms[0].AcceptedFields); + Assert.Empty(result.Report.Transforms[0].RejectedFields); } [Fact] @@ -165,7 +167,7 @@ public sealed class ApophysisReferenceParityTests Assert.True(result.Report.AcceptedFieldCount > 0); Assert.True(result.Report.ApproximatedFieldCount > 0); Assert.True(result.Report.RejectedFieldCount > 0); - Assert.Contains(result.Report.Transforms, transform => transform.RejectedFields.Contains("post")); + Assert.Contains(result.Report.Transforms, transform => transform.AcceptedFields.Contains("post")); Assert.Contains(result.Report.Transforms, transform => transform.RejectedFields.Any(field => field.StartsWith("wfield_", StringComparison.Ordinal))); } diff --git a/tools/Aquarium.Fractal.Receipt/Program.cs b/tools/Aquarium.Fractal.Receipt/Program.cs index 8a28067..18c30ec 100644 --- a/tools/Aquarium.Fractal.Receipt/Program.cs +++ b/tools/Aquarium.Fractal.Receipt/Program.cs @@ -419,7 +419,9 @@ internal sealed class GpuFractalSplatReceiptRunner : IDisposable new Vector4(branch * 0.42f, scale, 0.18f + index * 0.013f), new Vector4(radius, radius * 0.62f, rotation, 4.0f), new Vector4((index + 1.0f) / (transformCount + 1.0f), index * 31 + 7, MathF.Cos(rotation), MathF.Sin(rotation)), - new Vector4(index % 6, 0.0f, 0.0f, 0.0f)); + new Vector4(index % 6, 0.0f, 0.0f, 0.0f), + new Vector4(1.0f, 0.0f, 0.0f, 1.0f), + Vector4.Zero); } return transforms;