namespace CultMath; /// /// The value-and-gradient result of (invariant 8's one struct /// return shape). Every field follows the same float4(gradient.xyz, value.w) layout as a /// bare value-and-gradient return. /// public struct CultCellular { /// (∇F1, F1): the gradient and distance to the nearest feature point. public float4 nearest; /// (∇F2 - ∇F1, F2 - F1): for lineae along cell borders. public float4 edge; /// The nearest cell's pcg4d hash, mapped to [0, 1); independent of the pcg3d hash that /// produced that cell's jitter. public float id; public CultCellular(float4 nearest, float4 edge, float id) { this.nearest = nearest; this.edge = edge; this.id = id; } }