Shaders: GalaxyMap, Clouds, SimplexBrush and Lightning.compute call cultmath_snoise

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>
This commit is contained in:
Nibu 2026-11-11 12:08:15 +00:00
commit b6c428d682
5 changed files with 13 additions and 11 deletions

View file

@ -25,7 +25,7 @@ Category {
#pragma target 2.0
#include "UnityCG.cginc"
#include "Assets/Plugins/GPU Noise/SimplexNoise3D.cginc"
#include "Packages/org.gamecult.cultmath/Shaders/CultMath.hlsl"
float _Depth;
float _Power;
@ -68,7 +68,7 @@ Category {
fixed4 frag (v2f i) : SV_Target
{
float dist = length(i.texcoord - float2(.5,.5));
return powerPulse(dist * 2,_Power) * (_Depth * abs(snoise(float3(i.texcoord1.xy*_Frequency,_Time.y*_Speed)))+_Constant);
return powerPulse(dist * 2,_Power) * (_Depth * abs(cultmath_snoise(float3(i.texcoord1.xy*_Frequency,_Time.y*_Speed)))+_Constant);
}
ENDCG
}

View file

@ -29,7 +29,7 @@
#pragma fragment frag
#include "UnityCG.cginc"
#include "Assets/Plugins/GPU Noise/SimplexNoise3D.cginc"
#include "Packages/org.gamecult.cultmath/Shaders/CultMath.hlsl"
struct appdata
{
@ -64,7 +64,7 @@
float sum = 0;
for(int i = 0; i < 6; i++)
{
sum += snoise(p * freq + Parallax * ParallaxDirection) * amp;
sum += cultmath_snoise(p * freq + Parallax * ParallaxDirection) * amp;
parallax /= ParallaxLacunarity;
freq *= NoiseLacunarity;
amp *= NoiseGain;
@ -83,7 +83,7 @@
fixed4 frag (v2f i) : SV_Target
{
float3 p = float3(i.uv,_Time.x*Speed);
float noise = saturate((1-abs(snoise(p*NoiseFrequency/2))) * fbm(p));
float noise = saturate((1-abs(cultmath_snoise(p*NoiseFrequency/2))) * fbm(p));
return noise * _Color * (1-length(i.uv)/FadeDistance);
}
ENDCG

View file

@ -5,7 +5,7 @@
#define NUM_THREAD_X 64
#include "LightningVertex.cginc"
#include "Assets/Plugins/GPU Noise/SimplexNoise2D.cginc"
#include "Packages/org.gamecult.cultmath/Shaders/CultMath.hlsl"
struct Node
{
@ -46,7 +46,7 @@ float fbm(float2 p)
float sum = 0;
for(int i = 0; i < 4; i++)
{
sum += snoise(p * freq) * amp;
sum += cultmath_snoise(p * freq) * amp;
freq *= _NoiseLacunarity;
amp *= _NoiseGain;
}

View file

@ -36,7 +36,7 @@ Shader "Unlit/GalaxyMap"
#pragma fragment frag
#include "UnityCG.cginc"
#include "Assets/Plugins/GPU Noise/SimplexNoise2D.cginc"
#include "Packages/org.gamecult.cultmath/Shaders/CultMath.hlsl"
struct appdata
{
@ -86,8 +86,8 @@ Shader "Unlit/GalaxyMap"
for(int i = 0; i < octaves; i++)
{
if(i<4)
sum += (1-abs(snoise(p * freq))) * amp;
else sum += abs(snoise(p * freq)) * amp;
sum += (1-abs(cultmath_snoise(p * freq))) * amp;
else sum += abs(cultmath_snoise(p * freq)) * amp;
freq *= NoiseLacunarity;
amp *= NoiseGain;
}

View file

@ -7459,7 +7459,9 @@ That file's Cut 4 (AI heading planner) and Cut 5 (combat facing) are carried as
is `stage.Generated("Djinni")`, `EvasionTermTests.cs:520`, so the target's fit follows the galaxy). The
cause is 0.3.0's breaking `snoise` kernel (its CHANGELOG), read in C# by `Settings.cs:72-73` (galaxy
cloud density), `GlobalData.cs:30` and `Environment.cs:132,144`. Shaders use the GPU Noise plugin, not
CultMath (`Background.shader:39`), so nothing on the GPU moves. Every other DemoTerminus test passes.
CultMath (`Background.shader:39`), so nothing on the GPU moved at 0.3.0. GalaxyMap, Clouds, SimplexBrush and
Lightning.compute now include `CultMath.hlsl`; Background keeps its 2D gradient copy because CultMath has no 2D
`snoise_grad`. Every other DemoTerminus test passes.
Between the tags CultMath also adds `phacelle` (MPL-2.0 files), `cellular`, `smin_grad`, the `*_grad`
noises and `BoundedLeastSquares`; no existing signature changes.
- **TA9. The pin guard.** `Directory.Build.targets:21` conditions `VerifyCultLibRevision` on a