Table of Contents

Class SceneGlowCaves

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

The linked caves' boxes the glow modes read (pure; the GPU's FishGlowCaveRow mirrors RowAt(IReadOnlyList<SceneGlowCave>, Vector3, int)): found from the cave-life spots every client loads (SceneCaveLife: each spot of a linked cave carries its interior biome), so nothing new is stored. A glow whose origin is inside a box reads the box's row before any anchor disc or the biome grid.

public static class SceneGlowCaves
Inheritance
SceneGlowCaves
Inherited Members

Fields

MaxCaves

The most boxes the GPU holds (FishGlowModes.hlsl's _FishGlowCaves: two float4 each).

public const int MaxCaves = 16

Field Value

int

MostAcross

The widest and tallest a spot's own air is taken, metres.

public const float MostAcross = 12

Field Value

float

MostUp

The widest and tallest a spot's own air is taken, metres.

public const float MostUp = 30

Field Value

float

Pad

How far a box reaches past its spots' air, metres (the roof's colonies, the walls' crystals).

public const float Pad = 2

Field Value

float

Methods

FromSpots(IReadOnlyList<SceneCaveLifeSpot>, List<SceneGlowCave>)

The boxes of the linked caves among spots (a spot with an interior biome; its mouth spots left out, as they reach out of the cave), one per site and interior in the order first met, each the union of its spots' air padded by Pad, its row −1. Appended to into.

public static void FromSpots(IReadOnlyList<SceneCaveLifeSpot> spots, List<SceneGlowCave> into)

Parameters

spots IReadOnlyList<SceneCaveLifeSpot>
into List<SceneGlowCave>

Pack(in SceneGlowCave, out Vector4, out Vector4)

A box packed as the GPU reads it: (min x, min z, max x, max z) and (min y, max y, row, 0).

public static void Pack(in SceneGlowCave c, out Vector4 a, out Vector4 b)

Parameters

c SceneGlowCave
a Vector4
b Vector4

RowAt(IReadOnlyList<SceneGlowCave>, Vector3, int)

The row a glow at a world point reads: the first box holding it with a row, else fallback.

public static int RowAt(IReadOnlyList<SceneGlowCave> caves, Vector3 p, int fallback)

Parameters

caves IReadOnlyList<SceneGlowCave>
p Vector3
fallback int

Returns

int

SpotBounds(in SceneCaveLifeSpot, out Vector3, out Vector3)

The air round one spot, world metres: across it the larger of its extent's x and z (1 to MostAcross), and up and down its extent's y (1.5 to MostUp: a floor's air to the roof, a roost's down to the floor, a box's half height).

public static void SpotBounds(in SceneCaveLifeSpot s, out Vector3 min, out Vector3 max)

Parameters

s SceneCaveLifeSpot
min Vector3
max Vector3