render3d: r3d_fog_wall(dist) - fog that closes to the sky's horizon colour from 0.3 dist to dist, and nothing drawn past dist + 8 m
Every lit program blends toward the horizon colour (the prefiltered sky with the sun's inscatter, so it carries the day's grade); the sky's horizon band is pulled to the same colour, wider the closer the wall. The far plane, scatter and stream cull reach and the shadow cascades are clamped to the wall; the reflection pass shares the shaders and the cull. 0 is off: every branch is gated on u_fog_wall > 0 and r3d_reach hands back the far it was given. R3D_FOG_WALL=<m> for a shot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
160ce96e4f
commit
b9f9cb8495
67 changed files with 335 additions and 227 deletions
|
|
@ -358,7 +358,7 @@ function gsl_constants(render3d_st: mut Render3dState) -> void {
|
|||
let fix = m4_new(); let proj = m4_new(); let v2c = m4_new(); let c2v = m4_new()
|
||||
let cur = m4_new(); let prev = m4_new(); let inv_cur = m4_new(); let c2p = m4_new(); let p2c = m4_new()
|
||||
gsl_clip_fix(fix)
|
||||
m4_perspective(proj, render3d_st.cam_fov, render3d_st.cam_aspect, render3d_st.cam_near, render3d_st.cam_far)
|
||||
m4_perspective(proj, render3d_st.cam_fov, render3d_st.cam_aspect, render3d_st.cam_near, r3d_reach(render3d_st, render3d_st.cam_far))
|
||||
m4_mul(v2c, fix, proj)
|
||||
m4_inverse(c2v, v2c)
|
||||
gsl_put_m4(k, 32, v2c) # cameraViewToClip (no jitter)
|
||||
|
|
@ -393,7 +393,7 @@ function gsl_constants(render3d_st: mut Render3dState) -> void {
|
|||
gsl_put_v3(k, 400, render3d_st.cam_right)
|
||||
gsl_put_v3(k, 412, render3d_st.cam_fwd)
|
||||
Vk.put_i32(k, 424, float_bits(render3d_st.cam_near))
|
||||
Vk.put_i32(k, 428, float_bits(render3d_st.cam_far))
|
||||
Vk.put_i32(k, 428, float_bits(r3d_reach(render3d_st, render3d_st.cam_far)))
|
||||
Vk.put_i32(k, 432, float_bits(render3d_st.cam_fov))
|
||||
Vk.put_i32(k, 436, float_bits(render3d_st.cam_aspect))
|
||||
Vk.put_i32(k, 440, float_bits(0.0)) # motionVectorsInvalidValue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue