diff --git a/BozoEngine b/BozoEngine index 36991be..d04e9d8 160000 --- a/BozoEngine +++ b/BozoEngine @@ -1 +1 @@ -Subproject commit 36991beb982a3a8d4657cbb5258d38cb9650d405 +Subproject commit d04e9d863c001bb74e7d28caefa6744e571cec63 diff --git a/CHANGELOG.md b/CHANGELOG.md index 20d6739..59d909f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Hidden test runs: `--hidden` runs the game silently without showing its window, and `--capture-frame` then reads the game's offscreen picture. `--mute` runs without a sound device. ### Fixed +- Character shadows no longer vanish with anti-aliasing on (Video tab). - Town water no longer turns into a mirror of the cliffs after the menu has been opened. ### Changed diff --git a/runtime/dc_native.cpp b/runtime/dc_native.cpp index af7c249..5d0b344 100644 --- a/runtime/dc_native.cpp +++ b/runtime/dc_native.cpp @@ -2213,6 +2213,12 @@ namespace dc::native // texture shares its Z buffer): where a character stands in front of the ground, its depth hides the flattened // shadow, the work texture stays unmarked and the character is not darkened. mark.depthTest = true; + // With anti-aliasing the shared depth is resolved from one sample point off each pixel's centre: on sloping + // ground it can lie nearer than the mark's centre depth, and every mark failed (the shadows vanished). The + // marks are moved toward the camera by up to a pixel's depth slope then; without anti-aliasing they stay at + // the ground's own depth, as on the GS. + if (renderer.antiAliasing() >= 2) + mark.depthOffsetSlope = mark.depthOffsetUnits = 1.0f; for (ShadowDraw &draw : draws) { for (bozo::render::Vertex &v : draw.vertices)