// 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 positions; StructuredBuffer gradients; RWStructuredBuffer globalOut; RWStructuredBuffer slopeOut; RWStructuredBuffer 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]); }