render3d: the fog wall is solid by 0.85 of it and the blades end at 0.75
Whatever is cut at the wall is now cut inside full fog: at 0.3-1.0 the last metres before the cut were 80-95% fogged against fully fogged ground behind, which drew a line of tufts at 70 m and a dark band of blade tips at 30 m. The blades thin out while the fog is still coming in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
2ce2d997be
commit
f65bd1aca1
27 changed files with 7 additions and 3 deletions
|
|
@ -127,9 +127,12 @@ function grass_init(render3d_st: mut Render3dState) -> void {
|
|||
}
|
||||
|
||||
# indices per 16 m cell that could exist at distance d (the count the shader computes)
|
||||
# no blades past the fog wall: they would be drawn only to be fogged away
|
||||
# Under a fog wall the blades end at three quarters of it. A blade's tip stands against ground
|
||||
# much farther off, and a dark blade 85% fogged read as a dark band against fully fogged ground
|
||||
# behind it; ending here, they thin out (the cull's last 30%) while the fog is still coming in.
|
||||
const GRASS_FOG_END: float = 0.75
|
||||
function grass_reach(render3d_st: Render3dState) -> float {
|
||||
let w = render3d_st.r3d_fog_wall
|
||||
let w = render3d_st.r3d_fog_wall * GRASS_FOG_END
|
||||
if w > 0.0 and w < render3d_st.grass_radius { return w }
|
||||
return render3d_st.grass_radius
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue