Skip to content

Fix light fringes beside plants, water grain and crooked traced shadows - #4

Merged
VLOD-ZDOV merged 2 commits into
masterfrom
claude/determined-bell-cr7vmd
Sep 24, 2026
Merged

VLOD-ZDOV merged 2 commits into
masterfrom
claude/determined-bell-cr7vmd

Conversation

@VLOD-ZDOV

Copy link
Copy Markdown
Owner

Light fringes beside plants and blocks

  • The cloud-shadow "roof" march took any grass tuft or block within 12 blocks toward the sun for a ceiling and lifted the cloud's shade in that object's own sun-shadow. A hit now counts as a roof only when it is at least 2 blocks above the point and close behind the surface.
  • The occlusion blur is now depth-aware, so it no longer averages silhouettes into the shaded ground beside them.
  • Bloom no longer masks by a stale occlusion texture when whole-scene occlusion is on.

Water

  • No per-pixel shadow jitter in the translucent pass, which is never frame-averaged.
  • The scene copy under the water is sampled linearly.
  • Waves fade out where they would alias.
  • Reflections fade at the thickness limit instead of flipping between hit and miss.
  • The water's tint thins out at the shore.

Traced shadows

  • Faces are turned toward the eye rather than the feet. Uses a new eye field in the frame uniforms at offset 1024.
  • Smaller lift off the surface, scaled by distance; foliage keeps the old lift because it sways.
  • North- and south-facing walls now receive shadows.
  • Spread rays no longer dip into their own surface.
  • Built chunks near the camera but off screen stay in the top-level structure.
  • Cross-shaped plants are masked out of shadow rays, so they no longer cast the square shadow of their quad.
  • Creature shadows are shifted by the camera's motion since they were drawn.
  • Cloud shadows are measured from the eye, at the height the game draws the clouds.

Build

  • build.gradle passed glslangValidator a --target-spv flag it does not have. It now passes a second --target-env spirv1.4.

Testing

  • Both SPIR-V variants of terrain.frag are rebuilt and pass spirv-val. All GL shaders pass tools/check-gl-shaders.py.
  • vkimpl compiles against LWJGL 3.
  • Nothing has been checked in-game yet.
  • The ray-query variant grew about 3.8% overall. The code comments record a device loss at 7.4% growth in the translucent pipeline; most of the added code is dead there once the pipeline is specialised.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XgyQ6udAHEtvknGZJzyhre


Generated by Claude Code

Grass and single blocks passed for a roof in the cloud-shadow march and
lifted the cloud's shade in their own sun-shadow; the occlusion blur
averaged silhouettes into the shaded ground beside them. The water
pass no longer jitters its shadow rays, reads the scene through a
filtered four-tap lookup, fades waves where they would alias, softens
reflections at the edge of a hit and thins its tint at the shore.
Bloom no longer masks by a stale occlusion when the whole scene is
darkened instead. build.gradle passed glslangValidator a flag it does
not have for the ray-query variant.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XgyQ6udAHEtvknGZJzyhre
Faces were turned towards the player's feet rather than the eye, so top
faces between the two were never shadowed; the lift off the surface
moved shadow edges a third of a block at a low sun; north and south
walls met the sun at exactly zero and were skipped; spread rays could
dip into their own surface. Chunks near but off screen now keep casting,
plants no longer throw the square shadow of their quad, creature
shadows no longer trail a frame of camera motion, and cloud shadows are
measured from the eye at the height the game draws the clouds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XgyQ6udAHEtvknGZJzyhre
@VLOD-ZDOV
VLOD-ZDOV merged commit d282ede into master Sep 24, 2026
2 checks passed
@VLOD-ZDOV VLOD-ZDOV mentioned this pull request Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants