fix(render3d): a lake can be the mirrored water, with its own wet shore
A reflecting body is clipped to its ellipse like every other unless it is an unbounded sea, so a map whose reflection belongs to its lake (Maroon Lake, once its sea sits below it) does not draw that lake's level over every hollow in the survey. The terrain's wet shore and its forest and scree gates read the carved lake's line inside its outline (u_lake), the rule grass already used. SPIR-V regenerated. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
132deac5bc
commit
6dfdee75e2
11 changed files with 62 additions and 35 deletions
|
|
@ -361,9 +361,12 @@ function water_draw(depth_tex: int) -> void {
|
|||
var r = F_ZERO
|
||||
if i == wb_primary { r = ron }
|
||||
u_f(gpu_uniform(p, "u_refl_on"), r)
|
||||
# every body but the mirrored sea is clipped to the ellipse inside its bounds
|
||||
# Every body is clipped to the ellipse inside its bounds but an unbounded mirrored sea,
|
||||
# whose rectangle is the point. A mirrored LAKE is clipped like any other: a map whose
|
||||
# reflection belongs to its lake (the Bells in Maroon Lake) would otherwise draw that
|
||||
# lake's level over every hollow in the survey.
|
||||
var clip = F_ONE
|
||||
if i == wb_primary { clip = F_ZERO }
|
||||
if i == wb_primary and f_gt(f_max(wb_ex[i], wb_ez[i]), fi(10000)) { clip = F_ZERO }
|
||||
u_f(gpu_uniform(p, "u_clip_ellipse"), clip)
|
||||
mesh_draw(water_mesh)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue