Repository navigation
Frame generation: rounding noise in a uniform row is not a list switching (#899) - #912
Merged
Merged
Conversation
…hing (#899) The rule that shows a fragment-stage buffer whole at this frame's values when an element goes between zero and non-zero (the light list filling its slots in another order) also caught the camera block's fragment-stage copy after an NPC talk: one matrix element sat at -1.9e-06 next to values of about 254 and went to 0 and back as the camera zoomed out. The in-betweens then read this frame's camera in the fragment stage and the blended one in the vertex stage, and the tilt-shift blur and the near-camera dither fade went wrong for single images: the environment flickered. Such a value is now measured against the largest value in its row of four (either frame) as well as the old 1e-6. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Fixes #899: with Frame Generation on, the scenery flickered after talking to an NPC.
What was wrong
interp_prepare(runtime/nvn/interp.c) has a rule for fragment-stage buffers: when an element goes between exactly 0 and non-zero, the buffer is treated as a list whose slots switch (the game's light list), and the whole buffer shows this frame's values. The only filter on "non-zero" was an absolute 1e-6.After an NPC talk, the camera block's fragment-stage copy (stage 1, slot 1, 1024 bytes) holds a row of
0.445, -1.9e-06, -254.3, 254.5. The -1.9e-06 is rounding noise, and during the camera zoom-out it went to 0 and back. The rule then gave those in-betweens this frame's camera in the fragment stage but the blended camera in the vertex stage. The tilt-shift blur and the near-camera dither fade came out wrong for single images, which showed as the flicker. The reporter's log shows it:lists switchedis 0.3 per frame before the talk and 12-20 after it.The fix
A value going to or from zero now also has to be larger than 1e-5 of the largest value in its row of four (in either frame). A real list slot switching on still counts: its row's largest element is the one that changes. Rounding noise next to values of about 250 no longer does.
Testing
Repro on both machines: scratch save, warp to Field_12B, talk to Grandma Yahoo, close the text, walk. Every image was saved with
LARECOMP_INTERP_SEQ, and the sharpness of each in-between was compared with its game images.lists switchedwas 15-20. After: none, andlists switchedis 0.0. Angler's Tunnel still shows real light-list switches (1-2.5 per frame), so the rule still does its original job.LARECOMP_INTERP_HZ=240, the reporter's settings: 2x, bilinear, shadows 4x, AO high): before, single in-betweens in the zoom-out were far sharper than both neighbours (+7.5 on the top band) with dither and facets. After: every in-between is within 0.12 of its game image, with no dither. Builds clean.🤖 Generated with Claude Code