Table of Contents

Class SceneMagma

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

The molten lava of a lava tube that still runs (2026-10-20; Magma and Fumes): its light's colour and slow churn, how its seed carries the body under it, how much it sparks, the hot air over it and the haze under the roof. One definition read by the client's site lights (SiteLightPool), its embers and fumes (SiteEmbers), its heat haze (the heat shimmer) and the cave walk render.

public static class SceneMagma
Inheritance
SceneMagma
Inherited Members

Remarks

Shared by every player. The churn is a pure function of the shared motion clock (WorldMotion, wrapped at WrapSeconds as the shaders' _FishWeatherMisc.w is) and the light's place, each beat a whole number of cycles in the wrap, as SceneGlow's pulse is: two players beside one river see it surge together.

The colour is the light of lava's own glow: a crust's cracks at 1000–1150 °C shine a deep orange (blackbody ~1300 K, little blue), a fall's torn, fresher surface a little yellower. Underground no sky outshines it, so it burns the same by day as by night.

Fields

BodyShift

The bits of a seed that carry the body's half-width (decimetres, 0–25.5 m) and its kind.

public const int BodyShift = 24

Field Value

int

ChurnMiddle

The churn: its middle and each beat's depth (a river's and a lake's runs between 0.85 and 1.15; a fall's to 1.2).

public const float ChurnMiddle = 1

Field Value

float

FallBase

How much brighter each metre of a body's half-width (a lake's radius) makes its light, and the most it reaches, by body.

public const float FallBase = 12

Field Value

float

FallMost

How much brighter each metre of a body's half-width (a lake's radius) makes its light, and the most it reaches, by body.

public const float FallMost = 24

Field Value

float

FallPerMetre

How much brighter each metre of a body's half-width (a lake's radius) makes its light, and the most it reaches, by body.

public const float FallPerMetre = 4

Field Value

float

FallSparks

The share of an ember stream alive over each body (river, lake, fall): a fall throws the most.

public const float FallSparks = 1

Field Value

float

FumeColour

The fumes' own colour, a pale sulphur-yellow haze, before the lava's light under it.

public static readonly Color FumeColour

Field Value

Color

HalfWidthShift

The bits of a seed that carry the body's half-width (decimetres, 0–25.5 m) and its kind.

public const int HalfWidthShift = 16

Field Value

int

HeatLeast

The hot air over lava as the heat shimmer sees it: a ball this far over the surface, the body's half-width and this much more round it, never less than HeatLeast, metres.

public const float HeatLeast = 2.5

Field Value

float

HeatMargin

The hot air over lava as the heat shimmer sees it: a ball this far over the surface, the body's half-width and this much more round it, never less than HeatLeast, metres.

public const float HeatMargin = 1.5

Field Value

float

HeatMost

The hot air over lava as the heat shimmer sees it: a ball this far over the surface, the body's half-width and this much more round it, never less than HeatLeast, metres.

public const float HeatMost = 9

Field Value

float

HeatRise

The hot air over lava as the heat shimmer sees it: a ball this far over the surface, the body's half-width and this much more round it, never less than HeatLeast, metres.

public const float HeatRise = 1.2

Field Value

float

Intensity

A lava light's brightness at the middle of its churn, a narrow river's (Brightness(uint) scales it with the body), and its reach when its emitter names none, metres.

public const float Intensity = 6

Field Value

float

Remarks

2026-10-20 (first render: "the lava barely lights its surroundings"): molten rock at ~1100 °C floods a tube with light, far more than a campfire (Fire 3.2): a river's light starts at 6 and grows with its width, a lake's and a fall's further.

LakeBase

How much brighter each metre of a body's half-width (a lake's radius) makes its light, and the most it reaches, by body.

public const float LakeBase = 10

Field Value

float

LakeMost

How much brighter each metre of a body's half-width (a lake's radius) makes its light, and the most it reaches, by body.

public const float LakeMost = 36

Field Value

float

LakePerMetre

How much brighter each metre of a body's half-width (a lake's radius) makes its light, and the most it reaches, by body.

public const float LakePerMetre = 3

Field Value

float

LakeSparks

The share of an ember stream alive over each body (river, lake, fall): a fall throws the most.

public const float LakeSparks = 0.7

Field Value

float

PriorityLights

The lava lights that win a place in a pool of lights first (SiteLightPool, the cave walk render): the nearest PriorityLights within PriorityReach of the eye, ahead of every other light however near.

public const int PriorityLights = 12

Field Value

int

PriorityReach

public const float PriorityReach = 50

Field Value

float

Range

A lava light's brightness at the middle of its churn, a narrow river's (Brightness(uint) scales it with the body), and its reach when its emitter names none, metres.

public const float Range = 16

Field Value

float

Remarks

2026-10-20 (first render: "the lava barely lights its surroundings"): molten rock at ~1100 °C floods a tube with light, far more than a campfire (Fire 3.2): a river's light starts at 6 and grows with its width, a lake's and a fall's further.

RiverMost

How much brighter each metre of a body's half-width (a lake's radius) makes its light, and the most it reaches, by body.

public const float RiverMost = 16

Field Value

float

RiverPerMetre

How much brighter each metre of a body's half-width (a lake's radius) makes its light, and the most it reaches, by body.

public const float RiverPerMetre = 4

Field Value

float

RiverSparks

The share of an ember stream alive over each body (river, lake, fall): a fall throws the most.

public const float RiverSparks = 0.55

Field Value

float

RollDepth

The churn: its middle and each beat's depth (a river's and a lake's runs between 0.85 and 1.15; a fall's to 1.2).

public const float RollDepth = 0.06

Field Value

float

RollHz

The churn's beats, cycles a second (each whole in the 10 000 s wrap): a slow surge, a quicker roll, a fall's fast spatter.

public const float RollHz = 0.19

Field Value

float

SpatterDepth

The churn: its middle and each beat's depth (a river's and a lake's runs between 0.85 and 1.15; a fall's to 1.2).

public const float SpatterDepth = 0.05

Field Value

float

SpatterHz

The churn's beats, cycles a second (each whole in the 10 000 s wrap): a slow surge, a quicker roll, a fall's fast spatter.

public const float SpatterHz = 1.3

Field Value

float

SurgeDepth

The churn: its middle and each beat's depth (a river's and a lake's runs between 0.85 and 1.15; a fall's to 1.2).

public const float SurgeDepth = 0.09

Field Value

float

SurgeHz

The churn's beats, cycles a second (each whole in the 10 000 s wrap): a slow surge, a quicker roll, a fall's fast spatter.

public const float SurgeHz = 0.07

Field Value

float

WaveX

The churn's phase over the ground, cycles a metre along world x and z: lights down a river surge one after another.

public const float WaveX = 0.031

Field Value

float

WaveZ

The churn's phase over the ground, cycles a metre along world x and z: lights down a river surge one after another.

public const float WaveZ = 0.023

Field Value

float

WrapSeconds

The motion clock's wrap the churn is read on, seconds (WorldMotion.ShaderWrapSeconds; the shaders' FISH_MOTION_WRAP).

public const double WrapSeconds = 10000

Field Value

double

Methods

BodyOf(uint)

The kind of body a seed was made for (3 reads as a river).

public static SceneMagmaBody BodyOf(uint seed)

Parameters

seed uint

Returns

SceneMagmaBody

Brightness(uint)

A lava light's brightness at the middle of its churn, by its body and width (its seed): a river's 6 and 4 more a metre of half-width (to 16), a lake's 10 and 3 more a metre of radius (to 36), a fall's 12 and 4 more a metre (to 24).

public static float Brightness(uint seed)

Parameters

seed uint

Returns

float

Churn(float, float, float, SceneMagmaBody)

The churn at a moment of the shared motion clock (seconds, wrapped at WrapSeconds) for a light at world (x, z): a slow surge and a quicker roll, a fall's spatter over them; smooth in time and place.

public static float Churn(float seconds, float x, float z, SceneMagmaBody body)

Parameters

seconds float
x float
z float
body SceneMagmaBody

Returns

float

Colour(uint)

The light's colour: a deep blackbody orange, a fall's a little yellower.

public static Color Colour(uint seed)

Parameters

seed uint

Returns

Color

HalfWidthOf(uint)

The half-width (a lake's radius) of the body a seed was made for, metres.

public static float HalfWidthOf(uint seed)

Parameters

seed uint

Returns

float

HeatBall(in SceneEmitter)

The hot air over a lava light's body as a ball (xyz its centre, w its radius, world metres): over the surface by HeatRise, as wide as the body and HeatMargin more, between HeatLeast and HeatMost.

public static Vector4 HeatBall(in SceneEmitter e)

Parameters

e SceneEmitter

Returns

Vector4

Light(float, Vector3, uint)

A lava light's intensity at a moment: its Brightness(uint) × its churn, day and night alike.

public static float Light(float seconds, Vector3 at, uint seed)

Parameters

seconds float
at Vector3
seed uint

Returns

float

PickLights(IReadOnlyList<SceneEmitter>, Vector3, int, List<SceneEmitter>)

Which of the lights round an eye a pool of max real lights takes (SiteLightPool; the cave walk render mirrors it): from nearestFirst (every candidate, nearest first, more than max of them), first the nearest PriorityLights lava lights (Magma) within PriorityReach, then the rest nearest first until the pool is full; written to into in nearestFirst's order. Deterministic: a pure function of the list, so every player's pool is the same. A lava tube's lava fills it with light however many crystals glow round it.

public static void PickLights(IReadOnlyList<SceneEmitter> nearestFirst, Vector3 eye, int max, List<SceneEmitter> into)

Parameters

nearestFirst IReadOnlyList<SceneEmitter>
eye Vector3
max int
into List<SceneEmitter>

ReachFor(SceneMagmaBody, float)

How far a lava light over a body reaches, metres: a river's 12 + 3 a metre of half-width (14–22), a lake's 16 + 2.5 a metre of radius (18–32), a fall's 18 + 3 a metre (20–26).

public static float ReachFor(SceneMagmaBody body, float half)

Parameters

body SceneMagmaBody
half float

Returns

float

RiseFor(SceneMagmaBody, float)

How far over the molten surface a lava light stands, metres: a lake's higher the wider it is (to fill its chamber), a fall's a metre.

public static float RiseFor(SceneMagmaBody body, float half)

Parameters

body SceneMagmaBody
half float

Returns

float

Seed(uint, float, SceneMagmaBody)

A light's seed: hash's low 16 bits (its own phase), the body's half-width and its kind.

public static uint Seed(uint hash, float halfWidth, SceneMagmaBody body)

Parameters

hash uint
halfWidth float
body SceneMagmaBody

Returns

uint

Sparks(uint)

The share of an ember stream alive over a body.

public static float Sparks(uint seed)

Parameters

seed uint

Returns

float