atl/sm/render
import "atl/sm/render"Render setting overrides (sm.render). Mostly [client]; each Reset* restores the default.
Functions
Section titled "Functions"func DefaultFog() atl.Valuefunc DefaultVolumetricFog() atl.Valuefunc DefaultGI() atl.Valuefunc DefaultHorizonLight() atl.Valuefunc DefaultCameraLight() atl.Valuefunc DefaultReflectionColor() atl.Valuefunc DefaultVoxelLODBoost() float64The default settings, as tables of the matching Set* arguments.
func DrawDistance() float64The view distance.
func IsOutdoor() boolTrue when the camera is outdoors.
func OutdoorLighting() float64The day/night lighting fraction.
func SetOutdoorLighting(v float64)Overrides the day/night lighting fraction.
func SetCinematic(cinematic bool)Turns the cinematic render mode on or off.
func SetFog(f Fog)Overrides the fog.
func ResetFog()Restores the default fog.
func SetVolumetricFog(min, max, loopSpeed float64, scrollSpeed, scale sm.Vec3, intensity float64)Overrides the volumetric fog.
func ResetVolumetricFog()Restores the default volumetric fog.
func SetGI(weight float64)Overrides the global illumination weight.
func ResetGI()Restores the default global illumination.
func SetHorizonLight(top, horizon, bottom sm.Color, direction sm.Vec3, startDistance, endDistance, falloff float64)Overrides the sky's horizon light.
func ResetHorizonLight()Restores the default horizon light.
func SetCameraLight(l CameraLight)Overrides the camera light.
func ResetCameraLight()Restores the default camera light.
func SetLUT(a string, b *string, blend *float64)Color grading: blends LUT texture a toward b.
func ResetLUT()Restores the default color grading.
func SetReflectionLevelColor(level string, min, max, mul float64)Overrides the reflection color of one level.
func ResetAllReflectionColor()Restores every reflection color.
func SetVoxelLODBoost(boost float64)func ResetVoxelLODBoost()Overrides / restores the voxel terrain level-of-detail boost.
func SetClouds(c Clouds)Overrides the clouds.
ScreenPoint
Section titled "ScreenPoint"type ScreenPoint struct { X, Y float64}A point in screen pixels.
func ToScreen(world sm.Vec3, width, height int) ScreenPointWhere world appears on a screen of width x height pixels.
type Fog struct { StartDistance, EndDistance, Falloff float64 StartColor, EndColor sm.Color VerticalOpacity, VerticalFadeDistance, VerticalFalloff, VerticalStart, VerticalEnd float64 VerticalStartColor, VerticalEndColor sm.Color FadeDistance float64}Distance and height fog settings.
CameraLight
Section titled "CameraLight"type CameraLight struct { Intensity, Range float64 Color sm.Color FarIntensity, FarRange *float64 FarColor *sm.Color}The light that follows the camera, with optional far values.
Clouds
Section titled "Clouds"type Clouds struct { Coverage, Height, Radius, TallnessScale, DirectionalLightMod float64 Scroll, ScrollRotation sm.Vec3}Cloud settings.