Fix displacement to use full screen buffer, not just viewport.#4530
Merged
Loobinex merged 6 commits intodkfans:masterfrom Feb 8, 2026
Merged
Fix displacement to use full screen buffer, not just viewport.#4530Loobinex merged 6 commits intodkfans:masterfrom
Loobinex merged 6 commits intodkfans:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the eye lens rendering path in creature view so displacement effects sample from the full offscreen buffer (full screen width) rather than only the viewport slice, fixing incorrect displacement lookups when a sidebar is present.
Changes:
- Extend
draw_lens_effect()API to acceptviewport_xand adjust source buffering accordingly. - Fix displacement lens rendering to use full-screen source indexing while rendering only the viewport area.
- Ignore
.local/directory in Git.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/thing_creature.c |
Updates lens-effect call site to pass full source buffer and explicit viewport X offset. |
src/lens_api.h |
Updates draw_lens_effect() signature to include viewport_x. |
src/lens_api.c |
Implements viewport-aware source selection and correct displacement-map row stepping. |
.gitignore |
Adds .local/ to ignored paths. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.