Class Skybox3D
Namespace: ValveResourceFormat.Renderer.World
Assembly: Renderer.dll
A map's 3D sky: the scene its sky map was loaded into, and how that scene maps to the world.
public sealed class Skybox3DInheritance
Remarks
Nothing in the sky is scaled. The sky map is placed rigidly by the skybox_reference, and the sky_camera scale only moves the camera the sky is drawn through. Sky space is the space the nodes of live in; maps it to where the viewer sees it.
Constructors
Skybox3D(Scene, Matrix4x4, Vector3, float, WorldFogInfo, IReadOnlySet<Entity>)
Initializes the 3D sky from a loaded and placed sky scene.
public Skybox3D(Scene scene, Matrix4x4 referenceTransform, Vector3 origin, float scale, WorldFogInfo worldFog, IReadOnlySet<EntityLump.Entity> entities)Parameters
scene Scene
The scene the sky map was loaded into, already placed by referenceTransform.
referenceTransform Matrix4x4
The transform of the skybox_reference.
origin Vector3
The sky_camera position in sky space.
scale float
How many world units one unit of sky stands for.
worldFog WorldFogInfo
The fog of the map this sky belongs to.
entities IReadOnlySet<EntityLump.Entity>
The entities of the sky map.
Properties
Entities
Gets the entities of the sky map.
public IReadOnlySet<EntityLump.Entity> Entities { get; }Property Value
IReadOnlySet<EntityLump.Entity>
FogInfo
Gets the fog the sky is drawn with: the sky map's own gradient fog when it has an active one, otherwise the world's, and always the world's cubemap fog.
public WorldFogInfo FogInfo { get; }Property Value
FogSpace
Gets the conversion of fog authored in world units into sky space.
public FogSpace FogSpace { get; }Property Value
Origin
Gets the sky_camera position in sky space, which lines up with the reference position in the world.
public Vector3 Origin { get; }Property Value
ReferenceTransform
Gets the rigid transform the skybox_reference places the sky map with.
public Matrix4x4 ReferenceTransform { get; }Property Value
Scale
Gets how many world units one unit of sky stands for. Always positive.
public float Scale { get; }Property Value
Scene
Gets the scene the sky map was loaded into.
public Scene Scene { get; }Property Value
SkyToWorld
Gets the transform from sky space to where the viewer sees it in the world.
public Matrix4x4 SkyToWorld { get; }Property Value
Methods
ConfigureCamera(Camera, Camera)
Sets camera up to view the sky as from views the world: same orientation and projection, from the matching position in sky space.
public void ConfigureCamera(Camera camera, Camera from)Parameters
camera Camera
from Camera
Remarks
The clip planes are divided by the scale like the position, so sky fragments get the same depth as a sky scaled up to world size would.
EntityOriginToWorld(Vector3)
Maps the authored origin of one of to where the viewer sees it in the world.
public Vector3 EntityOriginToWorld(Vector3 origin)Parameters
origin Vector3
Returns
ToWorld(Vector3)
Maps a position in sky space to where the viewer sees it in the world.
public Vector3 ToWorld(Vector3 position)Parameters
position Vector3

