packages: ludic.ui's render3d backend threads Render3dState; render3d's settable vars (r3d_dem_path, post_*, grass_*, wt_wade_*, ...) are Render3dState's fields again, not lets
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
ce80e64b24
commit
3a87d02696
15 changed files with 152 additions and 148 deletions
|
|
@ -128,7 +128,7 @@ function daylight_set(render3d_st: mut Render3dState, hours: float) -> void {
|
|||
let lowsun = fog_rise * (1.0 - fog_high)
|
||||
var dens = render3d_st.day_fog_base * (1.0 + 1.5 * lowsun)
|
||||
dens = dens * (1.0 + 1.2 * oc)
|
||||
render3d_st.r3d_fog_density = dens * render3d_st.day_fog_mul * r3d_fog_scale
|
||||
render3d_st.r3d_fog_density = dens * render3d_st.day_fog_mul * render3d_st.r3d_fog_scale
|
||||
# how fast the haze thins with height: a settled morning's lies IN the valley, a noon sky is
|
||||
# thin all the way up, so the falloff rises as the sun drops
|
||||
render3d_st.r3d_fog_falloff = 0.002 * (1.0 + 1.6 * lowsun)
|
||||
|
|
@ -193,7 +193,7 @@ function daylight_set(render3d_st: mut Render3dState, hours: float) -> void {
|
|||
# so a before-and-after can be shot from ONE binary at one hour, which is the only kind of
|
||||
# comparison worth looking at, and it joins R3D_NOCLOUD / R3D_NOSHADOW / R3D_NOGI.
|
||||
if r3d_env_has(render3d_st, "R3D_NOAIR") {
|
||||
render3d_st.r3d_fog_density = render3d_st.day_fog_base * render3d_st.day_fog_mul * r3d_fog_scale
|
||||
render3d_st.r3d_fog_density = render3d_st.day_fog_base * render3d_st.day_fog_mul * render3d_st.r3d_fog_scale
|
||||
render3d_st.r3d_fog_falloff = 0.002
|
||||
render3d_st.r3d_fog_inscatter = 0.02
|
||||
render3d_st.r3d_fog_desat = 0.0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue