-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rendering loop rewrite #339
Merged
Merged
Conversation
This file contains 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
Vertices' origin at the bottom left, CCW order.
Also set texture wrapping parameters to eliminate artifacts on the edges of the output image when using linear sampling.
And use it in xBRZ shader.
I tested this on macOS and Windows and it's looking good to me. I think the source code is fine as is. Thanks a lot @GranMinigun. Should I go ahead and merge or do you still want to make some changes? |
Introduce ShaderPass object, which holds shader program and input/output texture indices.
GranMinigun
force-pushed
the
shaders-rework
branch
from
December 2, 2023 19:03
eb49acd
to
7493c7e
Compare
Missed indentation in one place, no functional changes. I can commit CRLF => LF conversion for touched files, if you want. But otherwise, go ahead. |
Thanks! |
cedricwaltercastroson
added a commit
to cedricwaltercastroson/NanoBoyAdvance
that referenced
this pull request
Dec 4, 2023
Rendering loop rewrite (nba-emu#339)
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.
Tested on Intel Core i5-7400 with integrated Intel HD Graphics 630 (max. clock is 1000 MHz), DDR4 2400 MHz, Mesa 23.2.1. Enabled xBRZ scaler, GBA colour correction, and LCD ghosting effect, the window size was set to 6x. Metrics reported by
intel_gpu_top
utility.The current renderer results in 60+% utilization, at ~600 MHz GPU clock. This PR reduces that to 45-50% utilization, at 230±30 MHz GPU clock. May be a bit lower in fullscreen mode, possibly results will vary depending on showed content.
The output of xBRZ shader differs slightly due to being moved to the end of the chain, but it's barely noticeable. When both xBRZ and LCD ghosting are enabled, the former is placed before the latter.
Shout if you'd like to see commit messages changed, code style adjusted, and more comments added. I intentionally omitted whitespace and line ending changes, for the sake of simpler review process. Can introduce them in a separate commit.
Extracted from and is a prerequisite to #332.