Flow field: FlowField owns the global flow, Zone.Flow evaluates it at zone time, VolumeSampling.LowerFlow lowers it
FlowField (ServerShared) is the flow law; Zone.Flow/FlowScroll read PlanetSettings.Flow at zone time. The Flow block moves from DefaultEnvironment to PlanetSettings (ZoneEnvironment key 1 is retired), VolumeSampling's frame-clock scroll accumulator and the Stardust leftover field are deleted, and slopeFlow returns 0 for a zero gradient. Unity parity probe follows in the next commit; this commit has not been built in Unity. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
1e219e96e3
commit
e8ec8e903c
9 changed files with 248 additions and 18 deletions
|
|
@ -691,6 +691,17 @@ public class Zone
|
|||
return GravityAcceleration(new float2(normal.x, normal.z), Settings.GravityStrength);
|
||||
}
|
||||
|
||||
// The global flow velocity at `position` in zone time, in u/s (FlowField is the law). The slope term reads the
|
||||
// downhill gradient, which GetNormal's xz is proportional to.
|
||||
public float3 Flow(float3 position)
|
||||
{
|
||||
var normal = GetNormal(position.xz);
|
||||
return FlowField.At(Settings.Flow, position, _time, new float2(normal.x, normal.z));
|
||||
}
|
||||
|
||||
// The flow's noise scroll at zone time; lowered to the shaders' _FlowScroll.
|
||||
public float FlowScroll => FlowField.Scroll(Settings.Flow, _time);
|
||||
|
||||
public static float PowerPulse(float x, float exponent)
|
||||
{
|
||||
x *= 2;
|
||||
|
|
|
|||
Loading…
Reference in a new issue