Class CubemapSky
Cubemap sky loaded through IVirtualFileSystem. Six images, or one
lat-long (raylib's LoadTextureCubemap has no lat-long layout, so the
engine converts it). Drawn first inside BeginMode3D. The five-face
Skybox stays for painted skies. IBL is a hemisphere taken from
this image and is off until SetIbl(bool). See docs/architecture/skybox.md.
public sealed class CubemapSky : IDisposable
- Inheritance
-
CubemapSky
- Implements
- Inherited Members
Fields
FaceSize
Face size of a generated cubemap. Six of these stay under the 2048 RGBA8 budget.
public const int FaceSize = 512
Field Value
Properties
Ibl
High lighting. Off leaves the sky picture and adds no light.
public bool Ibl { get; }
Property Value
IsReady
public bool IsReady { get; }
Property Value
Methods
CreateTestDay()
In-memory day sky so an example can show the cubemap without a file.
public static CubemapSky CreateTestDay()
Returns
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Draw()
Draw inside BeginMode3D, before the world. The cube stays on the camera.
public void Draw()
Irradiance(Vector3)
Irradiance for normal. Zero while Ibl is off,
so Min stays the sky with no extra light.
public Vector3 Irradiance(Vector3 normal)
Parameters
normalVector3
Returns
LoadFaces(IVirtualFileSystem, string, string, string, string, string, string, int)
Six face images from the VFS, order +X −X +Y −Y +Z −Z. Not Assimp.
public static CubemapSky? LoadFaces(IVirtualFileSystem vfs, string posX, string negX, string posY, string negY, string posZ, string negZ, int faceSize = 512)
Parameters
vfsIVirtualFileSystemposXstringnegXstringposYstringnegYstringposZstringnegZstringfaceSizeint
Returns
LoadLatLong(IVirtualFileSystem, string, int)
One lat-long image (.hdr or .png) from the VFS. Not Assimp.
public static CubemapSky? LoadLatLong(IVirtualFileSystem vfs, string path, int faceSize = 512)
Parameters
vfsIVirtualFileSystempathstringfaceSizeint
Returns
SetIbl(bool)
public void SetIbl(bool enabled)
Parameters
enabledbool