16#include <simplesquirrel/simplesquirrel.hpp>
23constexpr float kPi = 3.14159265f;
24constexpr float kMaxElevationDeg = 70.f;
25constexpr float kSkyCubeSize = 128;
26constexpr int kMaxFireflies = 8;
30inline float deg2rad(
float d) {
return d * kPi / 180.f; }
31inline float smoothstep(
float e0,
float e1,
float x) {
32 if (std::fabs(e1 - e0) < 1e-7f)
return x < e0 ? 0.f : 1.f;
33 const float t = std::clamp((
x - e0) / (e1 - e0), 0.f, 1.f);
34 return t *
t * (3.f - 2.f *
t);
50Vec3 atmosphereRadiance(Vec3
view, Vec3 sun,
float turbidity,
float mieStrength) {
51 const float mu = std::clamp(
view.x * sun.x +
view.y * sun.y +
view.z * sun.z, -1.f, 1.f);
52 const float horizonMass = 1.f / std::max(0.08f,
view.y + 0.14f);
53 const float sunMass = 1.f / std::max(0.06f, sun.y + 0.12f);
54 const Vec3 betaR{0.055f, 0.130f, 0.285f};
55 const Vec3 betaM =
scale(Vec3{0.18f, 0.17f, 0.15f}, mieStrength * (0.35f + turbidity * 0.09f));
63 const float rayleighPhase = 3.f / (16.f * kPi) * (1.f +
mu *
mu);
64 const float g = std::clamp(0.72f + turbidity * 0.008f, 0.72f, 0.82f);
65 const float gg =
g *
g;
66 const float miePhase = (1.f - gg) /
67 (4.f * kPi * std::pow(std::max(0.015f, 1.f + gg - 2.f *
g *
mu), 1.5f));
68 const Vec3 scatter =
add(
scale(betaR, rayleighPhase * 13.f),
69 scale(betaM, miePhase * 2.2f));
70 Vec3 sky =
mul(
mul(scatter, sunT), Vec3{1.f - viewT.
x, 1.f - viewT.y, 1.f - viewT.z});
73 sky =
add(sky,
scale(
mul(sunT, Vec3{0.18f, 0.22f, 0.30f}),
74 0.12f + 0.18f * (1.f - std::max(
view.y, 0.f))));
78Vec3 toneMapSky(Vec3
c,
float exposure) {
79 c =
scale(
c, std::max(exposure, 0.01f));
82 auto channel = [](
float x) {
83 x = std::clamp((
x * (2.51f *
x + 0.03f)) /
84 (
x * (2.43f *
x + 0.59f) + 0.14f), 0.f, 1.f);
85 return std::pow(
x, 1.f / 2.2f);
87 return {channel(
c.x), channel(
c.y), channel(
c.z)};
90Vec3 attenuatedSunColor(
float sunElevation,
float turbidity,
float mieStrength) {
91 const float mass = 1.f / std::max(0.06f, sunElevation + 0.12f);
93 scale(Vec3{0.18f, 0.17f, 0.15f}, mieStrength * (0.35f + turbidity * 0.09f)));
96 const float maxChannel = std::max({
c.x,
c.y,
c.z, 1e-5f});
97 return scale(
c, 1.f / maxChannel);
100Vec3 correlatedColorTemperature(
float kelvin) {
101 const float t = std::clamp(kelvin, 1000.f, 40000.f) / 100.f;
102 const float r =
t <= 66.f ? 1.f : 1.2929362f * std::pow(
t - 60.f, -0.13320476f);
103 const float g =
t <= 66.f ? 0.39008158f * std::log(
t) - 0.63184144f
104 : 1.1298909f * std::pow(
t - 60.f, -0.07551485f);
105 const float b =
t >= 66.f ? 1.f
107 : 0.5432068f * std::log(
t - 10.f) - 1.1962541f;
108 return {std::clamp(
r, 0.f, 1.f), std::clamp(
g, 0.f, 1.f),
109 std::clamp(
b, 0.f, 1.f)};
112Vec3 manualSunColor(
const PcgManualSunState &sun) {
120inline void sunDirection(
float elevDeg,
float azimDeg,
float &
dx,
float &
dy,
float &
dz) {
121 const float el = deg2rad(elevDeg);
122 const float az = deg2rad(azimDeg);
123 const float he = std::cos(el);
124 dx = he * std::sin(az);
126 dz = he * std::cos(az);
130inline uint32_t hash13(uint32_t
x) {
138inline float hashUnit(uint32_t
x) {
return float(hash13(
x) % 10000u) / 9999.f; }
142void fillSkyFace(std::vector<uint8_t> &
px,
int size,
int face,
143 const float sunDir[3],
const Vec3 &directSunColor,
float sunEnergy,
145 float turbidity,
float mieStrength,
float exposure,
float cloudiness,
147 void (*dirAt)(
int face,
int size,
int x,
int y,
float out[3])) {
149 for (
int y = 0;
y <
n; ++
y) {
150 for (
int x = 0;
x <
n; ++
x) {
152 dirAt(face,
n,
x,
y,
d);
153 const float len = std::sqrt(
d[0] *
d[0] +
d[1] *
d[1] +
d[2] *
d[2]);
154 if (len < 1e-6f) {
d[0] = 0.f;
d[1] = 1.f;
d[2] = 0.f; }
155 else {
d[0] /= len;
d[1] /= len;
d[2] /= len; }
158 const float x =
d[0] * std::cos(
angle) +
d[2] * std::sin(
angle);
163 const float up =
d[1];
164 const Vec3 view{
d[0], std::max(
d[1], 0.002f),
d[2]};
165 const Vec3 sun{sunDir[0], sunDir[1], sunDir[2]};
166 Vec3 day = atmosphereRadiance(
view, sun, turbidity, mieStrength);
167 Vec3 night{0.006f + 0.012f * std::max(
up, 0.f),
168 0.010f + 0.020f * std::max(
up, 0.f),
169 0.035f + 0.070f * std::max(
up, 0.f)};
171 scale(night, nightAmount));
174 const float dot =
d[0] * sunDir[0] +
d[1] * sunDir[1] +
d[2] * sunDir[2];
177 const float disc =
smoothstep(std::cos(deg2rad(0.65f)),
178 std::cos(deg2rad(0.35f)), dot) * sunEnergy;
179 const float sunMass = 1.f / std::max(0.06f, sun.y + 0.12f);
180 const Vec3 atmosphericSun{std::exp(-0.16f * sunMass),
181 std::exp(-0.28f * sunMass),
182 std::exp(-0.58f * sunMass)};
183 const Vec3 sunColor{atmosphericSun.
x * directSunColor.x,
184 atmosphericSun.y * directSunColor.y,
185 atmosphericSun.z * directSunColor.z};
190 if (nightAmount > 0.5f &&
up > 0.05f && dot < 0.98f) {
191 uint32_t
h = hash13(uint32_t((
x * 73856093) ^ (
y * 19349663) ^ (face * 83492791)));
193 const float tw = 0.6f + 0.4f * hashUnit(
h + 1u);
194 star = nightAmount * tw;
198 const Vec3 overcast{0.075f + 0.035f * std::max(
up, 0.f),
199 0.090f + 0.045f * std::max(
up, 0.f),
200 0.125f + 0.060f * std::max(
up, 0.f)};
202 scale(overcast, cloudiness));
206 const int i = (
y *
n +
x) * 4;
207 px[i + 0] = uint8_t(std::clamp(
color.x * 255.f, 0.f, 255.f));
208 px[i + 1] = uint8_t(std::clamp(
color.y * 255.f, 0.f, 255.f));
209 px[i + 2] = uint8_t(std::clamp(
color.z * 255.f, 0.f, 255.f));
216void cubeDir(
int face,
int size,
int x,
int y,
float out[3]) {
217 const float u = (2.f * (float(
x) + 0.5f) /
float(
size)) - 1.f;
218 const float v = (2.f * (float(
y) + 0.5f) /
float(
size)) - 1.f;
220 case 0:
out[0] = 1.f;
out[1] = -
v;
out[2] = -
u;
break;
221 case 1:
out[0] = -1.f;
out[1] = -
v;
out[2] =
u;
break;
222 case 2:
out[0] =
u;
out[1] = 1.f;
out[2] =
v;
break;
223 case 3:
out[0] =
u;
out[1] = -1.f;
out[2] = -
v;
break;
224 case 4:
out[0] =
u;
out[1] = -
v;
out[2] = 1.f;
break;
225 default:
out[0] = -
u;
out[1] = -
v;
out[2] = -1.f;
break;
292 elevDeg = std::asin(std::clamp(
sunDir[1], -1.f, 1.f)) * 180.f / kPi;
313 float h = std::fmod(hours, 24.f);
314 if (
h < 0.f)
h += 24.f;
365 const bool finite = std::isfinite(
state.pitchDegrees) &&
366 std::isfinite(
state.rotationDegrees) &&
367 std::isfinite(
state.intensity) && std::isfinite(
state.red) &&
368 std::isfinite(
state.green) && std::isfinite(
state.blue) &&
369 std::isfinite(
state.kelvin);
371 state.rotationDegrees < 0.f ||
state.rotationDegrees > 360.f ||
374 state.kelvin > 20000.f) {
377 "daynight.pcgManualSun"));
388 const bool finite = std::isfinite(
state.rotationDegrees) &&
389 std::isfinite(
state.exposure) && std::isfinite(
state.tintRed) &&
390 std::isfinite(
state.tintGreen) && std::isfinite(
state.tintBlue);
391 if (!
finite ||
state.rotationDegrees < 0.f ||
state.rotationDegrees > 360.f ||
392 state.exposure < 0.f ||
state.exposure > 30.f ||
state.tintRed < 0.f ||
393 state.tintGreen < 0.f ||
state.tintBlue < 0.f) {
396 "daynight.pcgSkybox"));
406 const float values[] = {
state.additionalLinearDistance,
state.additionalExponentialDensity,
409 state.globalDensityMultiplier,
state.densityAlbedoRed,
410 state.densityAlbedoGreen,
state.densityAlbedoBlue,
411 state.densityVolumeDistance};
413 if (!std::isfinite(
value))
417 const bool invalid =
state.additionalLinearDistance < -5000.f ||
418 state.additionalLinearDistance > 5000.f ||
419 state.additionalExponentialDensity < 0.f ||
420 state.additionalExponentialDensity > 0.05f ||
state.mode < 0 ||
423 state.startDistance < 0.f ||
state.startDistance > 5000.f ||
424 state.endDistance < 0.f ||
state.endDistance > 5000.f ||
425 state.globalDensityMultiplier < 0.f ||
426 state.globalDensityMultiplier > 5.f ||
427 state.densityAlbedoRed < 0.f ||
state.densityAlbedoGreen < 0.f ||
428 state.densityAlbedoBlue < 0.f ||
state.densityVolumeDistance < 0.01f ||
429 state.densityVolumeDistance > 1500.f ||
430 state.densityVolumeEffect < 0 ||
state.densityVolumeEffect > 4 ||
431 state.densityVolumeTiling < 0 ||
state.densityVolumeTiling > 5;
446 state.globalLightMultiplier};
451 "Pcg ambient-light values must be finite and non-negative", {}, {},
452 "daynight.pcgAmbientLight"));
454 if (
state.intensity > 10.f ||
state.globalLightMultiplier > 5.f)
457 "daynight.pcgAmbientLight"));
484 const Vec3
c = toneMapSky(atmosphereRadiance({std::sin(
angle), 0.04f, std::cos(
angle)},
494 const Vec3
c = toneMapSky(atmosphereRadiance({std::sin(
angle), 0.04f, std::cos(
angle)},
504 const Vec3
c = toneMapSky(atmosphereRadiance({std::sin(
angle), 0.04f, std::cos(
angle)},
513 const float night = impl_->
nightLight[1] ? 1.0f : 0.6f;
514 return 0.05f * night + impl_->
sunEnergy * 0.5f *
519 const float nextCloudiness = std::clamp(cloudiness, 0.f, 1.f);
523 impl_->
weatherFlash = std::clamp(lightningFlash, 0.f, 1.f);
530 return (
a.skyRed * 0.5f +
a.equatorRed * 0.35f +
a.groundRed * 0.15f) *
539 return (
a.skyGreen * 0.5f +
a.equatorGreen * 0.35f +
a.groundGreen * 0.15f) *
548 return (
a.skyBlue * 0.5f +
a.equatorBlue * 0.35f +
a.groundBlue * 0.15f) *
588 static constexpr float hazeDensity[] = {0.0025f, 0.005f, 0.01f, 0.02f, 0.04f};
601 const float modeScale = pcg.
mode == 2 ? 1.5f : 1.f;
614 {1.f, 0.f, 0.f}, {-1.f, 0.f, 0.f}, {0.f, 1.f, 0.f},
615 {0.f, -1.f, 0.f}, {0.f, 0.f, 1.f}, {0.f, 0.f, -1.f},
618 const float nightAmount = std::clamp((-impl_->
elevDeg) / 12.f, 0.f, 1.f);
619 const float skyRotation = deg2rad(
624 : Vec3{1.f, 1.f, 1.f};
625 for (
int face = 0; face < 6; ++face) {
627 const float rotatedX =
direction.
x * std::cos(skyRotation) +
635 const Vec3 night{0.006f + 0.012f * std::max(
up, 0.f),
636 0.010f + 0.020f * std::max(
up, 0.f),
637 0.035f + 0.070f * std::max(
up, 0.f)};
639 scale(night, nightAmount));
640 const Vec3 overcast{0.075f + 0.035f * std::max(
up, 0.f),
641 0.090f + 0.045f * std::max(
up, 0.f),
642 0.125f + 0.060f * std::max(
up, 0.f)};
651 const float linearLuminance =
653 const float encodedLuminance =
656 face, encodedLuminance > 1e-4f ? linearLuminance / encodedLuminance : 1.f);
700 if (
int(impl_->
flies.size()) >= kMaxFireflies)
return;
703 f.seed = float(impl_->
flies.size()) * 1.7f;
704 impl_->
flies.push_back(
f);
707 l->
setColor(0.6f, 0.9f, 0.3f, 0.9f);
715 impl_->
flies.clear();
725 if (impl_->
built)
return;
744 for (
const auto &
f : impl_->
flies) {
746 l->
setColor(0.6f, 0.9f, 0.3f, 0.9f);
756 if (!impl_->
gfx)
return;
764 const float elevDeg = impl_->
elevDeg;
765 const float azimDeg = impl_->
azimDeg;
766 const float nightAmount = std::clamp((-elevDeg) / 12.f, 0.f, 1.f);
782 directSun.x * impl_->
sunEnergy * weatherSun * globalLight + flashLight.x,
783 directSun.y * impl_->
sunEnergy * weatherSun * globalLight + flashLight.y,
784 directSun.z * impl_->
sunEnergy * weatherSun * globalLight + flashLight.z);
792 const int bucket = int(elevDeg) + int(azimDeg / 4.f) * 1000 +
796 std::vector<uint8_t> faces(
797 size_t(kSkyCubeSize) *
size_t(kSkyCubeSize) * 4 * 6);
798 for (
int f = 0;
f < 6; ++
f) {
799 std::vector<uint8_t> face(
800 size_t(kSkyCubeSize) *
size_t(kSkyCubeSize) * 4);
804 : Vec3{1.f, 1.f, 1.f};
805 fillSkyFace(face,
int(kSkyCubeSize),
f, impl_->
sunDir, directSun,
812 impl_->
skyFaces[
static_cast<size_t>(
f)] =
813 gfx->
newTexture(
int(kSkyCubeSize), int(kSkyCubeSize), face.data());
815 (size_t(kSkyCubeSize / 2) * size_t(kSkyCubeSize) + size_t(kSkyCubeSize / 2)) *
818 (
float(face[
center]) * 0.2126f + float(face[
center + 1]) * 0.7152f +
819 float(face[
center + 2]) * 0.0722f) /
821 std::memcpy(faces.data() +
size_t(
f) * face.size(), face.data(), face.size());
831 const bool night = elevDeg < 0.f;
835 const bool on = night && impl_->
nightLight[0];
850 for (
size_t i = 0; i < impl_->
flies.size(); ++i) {
853 const bool on = night && impl_->
nightLight[3];
858 f.y + std::sin(
t * 1.3f + 1.7f) * 0.4f,
859 f.z + std::cos(
t * 0.8f) * 0.6f);
869void DayNight::expose(ssq::Table &table) {
870 auto cls = table.addClass(
name, DayNight::create,
false);
875void DayNight::expose(ssq::Class &
cls) {
std::array< float, 4 > rotation
std::array< float, 3 > scale
#define Module_IMPL(ModuleName, newExpr)
std::set< std::string > values
RoadLaneDirection direction
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={})
Construct an error diagnostic with the standard error severity.
virtual std::string getName() const =0
Returns the name.
Move-only operation result carrying either a value or Status.
static Result success(T value)
Construct a successful result owning value.
static Result failure(Status status)
Construct a failed result from a structured status.
DayNight module — a time-of-day cycle that drives the sun, sky and light.
float getSpeed() const
Returns the speed.
float getWeatherFlash() const
Returns the weather flash.
float getSunR() const
Atmosphere-attenuated direct sunlight red channel, including intensity.
bool isPaused() const
True when paused.
int getFireflyCount() const
Returns the firefly count.
float getSunG() const
Atmosphere-attenuated direct sunlight green channel, including intensity.
PcgManualSunState getPcgManualSun() const noexcept
Return the authoritative manual-sun settings by value.
void applyReflectionProbeSky(graphics::ReflectionProbeCapture *probe) const
Synchronize linear directional sky radiance and sky IBL to a reflection probe.
float getSunDirY() const
Returns the sun dir y.
float getSkyR() const
Returns the sky r.
void applyAtmosphere(graphics::Volumetric *fog) const
Synchronize sun direction and atmosphere-derived fog lighting.
float getSkyG() const
Returns the sky g.
float getSkyB() const
Returns the sky b.
bool isNight() const
True when the sun is below the horizon (night).
float getSunDirZ() const
Returns the sun dir z.
void setPaused(bool paused)
Sets the paused.
void setSkyboxEnabled(bool enabled)
Sets the skybox enabled.
void clearFireflies()
Clears fireflies.
Result< void > setPcgManualSun(const PcgManualSunState &state)
Atomically replace the persistent Pcg manual-sun state.
void init(graphics::Graphics *gfx)
Idempotent; builds lights / sky cubemap on first call.
static const int kNamedLightCount
float getSunIntensity() const
0..1 sun energy; ramps to 0 below the horizon.
float getTimeOfDay() const
Returns the time of day.
float getAmbientR() const
Returns the ambient r.
bool isNightLight(const std::string &name) const
True when night light.
PcgFogState getPcgFog() const noexcept
Return the authoritative Pcg fog state by value.
float getAmbientB() const
Returns the ambient b.
Result< void > setPcgSkybox(const PcgSkyboxState &state)
Atomically replace Pcg's persistent skybox override.
float getSunAzimuth() const
Solar azimuth in degrees, measured clockwise from +Z.
PcgSkyboxState getPcgSkybox() const noexcept
Return the authoritative Pcg skybox override by value.
float getSkyExposure() const
Returns the sky exposure.
Result< void > setPcgAmbientLight(const PcgAmbientLightState &state)
Atomically replace Pcg ambient colors, intensity and direct-light multiplier.
Result< void > setPcgFog(const PcgFogState &state)
Atomically replace all Pcg fog and density-volume controls.
bool isSkyboxEnabled() const
True when skybox enabled.
void setFirePosition(float x, float y, float z)
Position of the campfire point light (fire system).
void addFirefly(float x, float y, float z)
Add one firefly anchor (world space); up to kMaxFireflies.
float getMieStrength() const
Returns the mie strength.
float getSunB() const
Atmosphere-attenuated direct sunlight blue channel, including intensity.
void setTurbidity(float turbidity)
Set aerosol turbidity. 1.5 is very clear; 10 is hazy.
PcgAmbientLightState getPcgAmbientLight() const noexcept
Return the authoritative Pcg ambient-light state by value.
float getAmbientG() const
Returns the ambient g.
~DayNight() override
Day night.
void setWeatherInfluence(float cloudiness, float lightningFlash)
Apply cloud cover and lightning exposure to the unified sky/lighting model.
static const char *const kNamedLights[]
float getTurbidity() const
Returns the turbidity.
void setSkyExposure(float exposure)
Exposure used when mapping physical sky radiance to the RGBA8 sky cubemap.
void setSpeed(float hoursPerRealHour)
Sets the speed.
float getSunElevation() const
Solar elevation in degrees (max at local noon, ~70°).
void setNightLight(const std::string &name, bool enabled)
Enable a named light system: "moonlight"|"starlight"|"fire"|"fireflies".
void setMieStrength(float strength)
Relative Mie aerosol density; controls horizon haze and solar halo.
float getAmbientBrightness() const
Returns the ambient brightness.
float getSunDirX() const
World-space direction pointing AT the sun (normalized).
float getWeatherCloudiness() const
Returns the weather cloudiness.
void setTimeOfDay(float hours)
Sets the time of day.
void update(float dt, graphics::Graphics *gfx)
Advance the clock and push sun/sky/light state; before gfx.render3D().
virtual Texture * newCubemap(int faceSize, const uint8_t *rgbaFaces)=0
Create an RGBA8 cubemap from 6 faces packed as +X,-X,+Y,-Y,+Z,-Z (each faceSize×faceSize,...
virtual void setDirectionalLight(float dx, float dy, float dz, float r=1.f, float g=1.f, float b=1.f)
Sets the directional light.
virtual void setBackgroundColorRGBA(float r, float g, float b, float a=1.f)
Sets the background color rgba.
virtual void setMesh3DEnv(Texture *cube, float intensity)=0
Specular IBL environment for subsequent default mesh draws. cube must be from newCubemap (or nullptr ...
virtual Texture * newTexture(int width, int height, const uint8_t *rgba, bool repeatU=false, bool repeatV=false)=0
Creates a texture. @ownership Caller deletes unless documented otherwise.
Declarative 3D light. Collected by RenderSystem3D (max 8 per frame). type: "point" | "dir" | "spot" (...
void setEnabled(bool enabled)
void setDirection(float dx, float dy, float dz)
void setPosition(float x, float y, float z)
static Light3D * createLight(const std::string &type="point")
void setRadius(float radius)
void setColor(float r, float g, float b, float intensity=1.f)
Incremental six-face HDR scene capture for a runtime reflection probe.
void setEnvironmentLighting(Texture *environment, float intensity=1.f)
Set non-recursive global environment lighting for captured geometry.
void setSkyFaceTextureScale(int face, float scale)
Set the linear HDR radiance multiplier for one sky face texture.
void setSkyFaceTexture(int face, Texture *texture)
Set a directional per-pixel sky texture for one capture face.
void setSkyFaceColor(int face, float r, float g, float b)
Override one directional backup sky face in +X,-X,+Y,-Y,+Z,-Z order.
GPU texture created via Graphics::newTexture. Owns GPU resources through an opaque backend handle.
float getFloat(const std::string &name) const
Returns the float.
void setMode(const std::string &mode)
"screenspace" | "raymarch" | "fog" | "froxel" | "cloud".
void setCloudLightColor(float r, float g, float b)
Direct sunlight color used by cloud single scattering.
void setFogEnd(float endDistance)
Sets the fog end.
std::string getMode() const
Returns the mode.
void setIntensity(float intensity)
Sets the intensity.
std::string getQuality() const
Returns the quality.
void setLightDirection(float dx, float dy, float dz)
World-space direction toward the lit surface (ray march / phase).
void setTime(float seconds)
Sets the time.
void setQuality(const std::string &quality)
"low" | "medium" | "high" (unknown → medium).
void setDensity(float density)
Sets the density.
void setFogStart(float startDistance)
View-distance ramp where fog appears (world units along the ray).
void setFogColor(float r, float g, float b)
Sets the fog color.
void exposeSkyScriptBindings(ssq::Table &table, ssq::Class &daynightClass)
Register independent sky bindings on the VM/graphics owner thread.
ForceVector add(ForceVector a, ForceVector b)
double dot(ForceVector a, ForceVector b)
Vec3 mul(Vec3 a, float scale)
float smoothstep(float edge0, float edge1, float value)
PcgManualSunState manualSun
std::vector< graphics::Light3D * > flyLights
std::array< float, 6 > skyFaceCenterLuminance
graphics::Volumetric * pcgFogTarget
std::string pcgFogBaseMode
graphics::Light3D * moonLight
graphics::Light3D * fireLight
std::string pcgFogBaseQuality
graphics::Texture * skyCube
std::array< graphics::Texture *, 6 > skyFaces
PcgAmbientLightState pcgAmbient
Pcg ambient-gradient colors and global direct-light multiplier.
float globalLightMultiplier
Joint Pcg Photo Mode fog and density-volume state.
float densityVolumeDistance
float globalDensityMultiplier
float additionalExponentialDensity
float additionalLinearDistance
bool overrideDensityVolume
Persistent manual sun settings projected from Pcg Photo Mode.
Persistent Pcg skybox override settings.
static TextureCreateInfo withMipmaps(bool aniso=true, float maxAniso=16.f)
With mipmaps.