fix(render3d): lakes clipped to their ellipse; r3d_fog_base
A water body other than the reflecting one drew its whole bounding rectangle, so the corners outside the lake's carved ellipse showed water over dry ground; those bodies now discard outside the ellipse. r3d_fog_base (default 0) is the height the height fog is measured from, so maps sharing one datum at different heights get the same air. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
7a0c03dd21
commit
3e76785b40
6 changed files with 26 additions and 1 deletions
|
|
@ -177,6 +177,10 @@ function water_draw(depth_tex: int) -> void {
|
|||
var r = F_ZERO
|
||||
if i == wb_primary { r = ron }
|
||||
u_f(gl_uniform(p, "u_refl_on"), r)
|
||||
# every body but the mirrored sea is clipped to the ellipse inside its bounds
|
||||
var clip = F_ONE
|
||||
if i == wb_primary { clip = F_ZERO }
|
||||
u_f(gl_uniform(p, "u_clip_ellipse"), clip)
|
||||
mesh_draw(water_mesh)
|
||||
}
|
||||
gl_disable(GL_BLEND)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue