Repository navigation
Conversation
LensFlareDraw clears its first work target before the occlusion plate, but never the second. The seed reads one row past the area downsampled into the second, as retail does, and above 512x480 a little past its right edge too. The ghost passes that draw into the second reach those texels as well, so their light built up there frame after frame. The composite stretched it into lines along the screen's right and bottom edges: the orange strips at the right of the 6 pm screenshot in TheMoonPeople#51. Clear the second target over the visible extent before the downsample, as the first already is. ScreenEffect.LensFlareLeavesNoEdgeOnceHidden draws a visible flare for eight frames at 1024x960, then hides the sun behind geometry and checks that the right and bottom edges keep the scene's colour. PresentRenderer takes an optional window size for it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
At 6 pm, while the sun's lens flare is drawn, two orange vertical strips show along the right edge of the screen. These are the "white strips across the screen on the right side" in #51's 06:00 PM screenshot. They are light that the flare left behind in earlier frames.
Part of #51. The sky specks in the same issue did not reproduce here, so this PR does not touch them.
Cause
LensFlareDraw(port/src/render/screeneffect.cpp) follows retail's passes in two window-sized work targets:The second target is never cleared, and the area just past the downsampled image is both read and written:
That light built up frame after frame, and the seed copied it into the flare's last column and row. The composite stretched those into lines along the screen's right and bottom edges. After the ghost passes' offset copies, the right one shows as two strips, around x 1252–1261 and 1273–1279 of a 1280x720 window.
Change
LensFlareDrawclears the second target over the visible extent before the downsample, as it already clears the first before the occlusion plate.ScreenEffect.LensFlareLeavesNoEdgeOnceHidden(port/src/tests/screeneffect_test.cpp):PresentRenderertakes an optional window size for the test. The other tests keep 512x480.Testing
Environment: macOS 26.6.2 arm64 (M4 Pro), Homebrew LLVM 23.1.5, MoltenVK 1.4.2, presets
macos-arm64(Debug) andmacos-arm64-release. PAL data (data_version20) for the replays.Replay (Release):
--jump town:1 --fast-load, turning the camera right between frames 200 and 290. There is no input after that, and frame 6900 (about 6 pm) shows the strips. "Orange" is the strongest red-minus-blue average over the top half of each of the last 40 columns. The scene beside them measures 16.ScreenEffect.*, Debugctest, DebugPcSettingsReplay.pad(KeyError: 'present_mode', also with a build of the parent commit), andGfxMisc.MeshBoundsFollowTheFlagAndAreInvalidatedByUpdatesandGfxGpuMeshDc2.FragmentInvocationQueriesPreservePixelsAndWindowOwnership, which test only the Kazarov renderer and fail on master in CI and locally"Without change" used builds of the parent commit (bcd1967).
Not covered
dng_main.cpppassesworkandwork2), but no dungeon flare was replayed.