Shaders use cultmath_snoise from CultMath.hlsl #13

Merged
nibu merged 2 commits from nibu/shaders-use-cultmath-hlsl into master 2026-11-11 12:10:41 +00:00
Member

GalaxyMap, Clouds, Lightning.compute and SimplexBrush now include Packages/org.gamecult.cultmath/Shaders/CultMath.hlsl (pinned cultmath-unity-v0.5.0) and call cultmath_snoise directly, so GPU fBm matches the CPU snoise used by Settings/Environment/GlobalData/LightningCompute.

Deleted from Assets/Plugins/GPU Noise (with .meta): ClassicNoise2D/3D, SimplexNoise3D, SimplexNoiseGrad3D (no remaining includers).

Kept: SimplexNoise2D + SimplexNoiseGrad2D for Background.shader. Gap: CultMath has no 2D gradient (cultmath_snoise_grad is float3 -> float4 only), and Background uses 2D snoise_grad (float2 -> float2). Left on its own include; not replaced.

Verification: Aetheria.Shared.Tests focused filter (Settings/Environment/GlobalData/Lightning/Noise/Galaxy) 26/26 pass; no test pins snoise numbers, no goldens changed. fxc cs_5_0 probe of float2/float3 cultmath_snoise against the tag's CultMath.hlsl (+ its 4 sibling includes) compiled on Starfire. Not verified: Unity import/compile of the shaders themselves, visual change (noise values shift from the old GPU Noise copies by design).

🤖 Generated with Claude Code

GalaxyMap, Clouds, Lightning.compute and SimplexBrush now include `Packages/org.gamecult.cultmath/Shaders/CultMath.hlsl` (pinned cultmath-unity-v0.5.0) and call `cultmath_snoise` directly, so GPU fBm matches the CPU snoise used by Settings/Environment/GlobalData/LightningCompute. Deleted from Assets/Plugins/GPU Noise (with .meta): ClassicNoise2D/3D, SimplexNoise3D, SimplexNoiseGrad3D (no remaining includers). Kept: SimplexNoise2D + SimplexNoiseGrad2D for Background.shader. Gap: CultMath has no 2D gradient (`cultmath_snoise_grad` is float3 -> float4 only), and Background uses 2D `snoise_grad` (float2 -> float2). Left on its own include; not replaced. Verification: Aetheria.Shared.Tests focused filter (Settings/Environment/GlobalData/Lightning/Noise/Galaxy) 26/26 pass; no test pins snoise numbers, no goldens changed. fxc cs_5_0 probe of float2/float3 cultmath_snoise against the tag's CultMath.hlsl (+ its 4 sibling includes) compiled on Starfire. Not verified: Unity import/compile of the shaders themselves, visual change (noise values shift from the old GPU Noise copies by design). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
CPU snoise (CultMath C#) and the GPU shaders now share one implementation, so
fBm agrees. Deletes the GPU Noise copies nothing includes any more (Classic 2D/3D,
Simplex 3D, SimplexGrad 3D). Background.shader keeps SimplexNoise2D/SimplexNoiseGrad2D:
CultMath has no 2D gradient (cultmath_snoise_grad is float3 -> float4 only).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The previous commit deleted the GPU Noise includes; this one carries the call-site
edits it described. Release map notes Background's remaining 2D gradient copy.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
nibu merged commit 5e443569c3 into master 2026-11-11 12:10:41 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
GameCult/Aetheria!13
No description provided.