- VolumeSampling registers FLOW_GLOBAL / FLOW_SLOPE with GlobalKeyword.Create (the constructor only looks up). - FlowField.Scroll folds each Tri3D octave's phase modulo 1 in double (float2, [0,1)); Zone.Flow evaluates at Zone.FlowScroll. - FlowField.Cycle: the nebula's flow cycle and Stardust's particle lifetime phase come from zone time (_FlowCycle, phase uniform), not _Time.y / Time.time. - FlowFieldParityVerify reaches the keyword-gated flow(), fails on logged errors, tolerance 3e-4; mutants updated. Not built or run when committed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
22 lines
867 B
Text
22 lines
867 B
Text
// Evaluates the shader flow functions for a buffer of positions and gradients, so that
|
|
// Aetheria.EditorTools.FlowFieldParityVerify can compare them with FlowField (ServerShared). Reads the same global
|
|
// _Flow* uniforms the nebula and stardust read, set by VolumeSampling.LowerFlow.
|
|
#pragma kernel Evaluate
|
|
|
|
#include "Assets/Shaders/Volumetric.cginc"
|
|
|
|
StructuredBuffer<float3> positions;
|
|
StructuredBuffer<float2> gradients;
|
|
RWStructuredBuffer<float3> globalOut;
|
|
RWStructuredBuffer<float3> slopeOut;
|
|
RWStructuredBuffer<float3> gatedOut; // flow(): the keyword-gated function the nebula and stardust call
|
|
uint count;
|
|
|
|
[numthreads(64, 1, 1)]
|
|
void Evaluate(uint3 id : SV_DispatchThreadID)
|
|
{
|
|
if (id.x >= count) return;
|
|
globalOut[id.x] = globalFlow(positions[id.x]);
|
|
slopeOut[id.x] = slopeFlow(gradients[id.x]);
|
|
gatedOut[id.x] = flow(positions[id.x]);
|
|
}
|