CultLib/packages/cultmath/scripts/unity-smoke/Good.compute
Meta Vens b88fdccb75 CultMath: commit the Unity import and dispatch smoke, with its broken control
packages/cultmath/scripts/unity-smoke/ holds the good compute shader, the
deliberately broken control, the EditMode test (FindKernel, dispatch, readback),
and run-unity-smoke.ps1, which builds a scratch project outside the repo with a
file: path to the package, takes the Unity path as a parameter, requires all
three tests to pass, and deletes the project. The package README's Unity section
names it as the pre-tag step. Not -nographics: GetComputeShaderMessageCount
reports 0 for a broken shader until FindKernel or Dispatch compiles it. Ran once
on Starfire with Unity 6000.3.24f1: 3 passed, control rejected. Builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 23:41:04 +02:00

11 lines
512 B
Text

#pragma kernel CSMain
#include "Packages/org.gamecult.cultmath/Shaders/CultMath.hlsl"
#include "Packages/org.gamecult.cultmath/Shaders/CultMath.Interval.hlsl"
#include "Packages/org.gamecult.cultmath/Shaders/CultMath.Affine.hlsl"
RWStructuredBuffer<float4> Out;
[numthreads(1,1,1)] void CSMain(uint3 id : SV_DispatchThreadID)
{
float2 r = cultmath_iv_add(float2(1, 2), float2(3, 5));
float2 a = cultmath_af_range(cultmath_af_add(cultmath_af_point(3), cultmath_af_point(5)));
Out[0] = float4(r, a);
}