-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Add an extra backbuffer color texture that can be used when an upscaler is in use. #83192
Add an extra backbuffer color texture that can be used when an upscaler is in use. #83192
Conversation
Please rebase your branch to solve CI |
a2e7887
to
325623d
Compare
Oops, guess I didn't make it in time yesterday when I branched off master. Hopefully it works now. |
My bad seems you did catch that one, unsure why it fails now |
My attempt at fixing this CI issue didn't work. Still don't know why it's randomly failing. Manually restarting it once all builds have completed might fix it. |
…er is in use. Fixes issue godotengine#83152. Due to how BLUR_0 is reused for multiple purposes and requires being at native resolution for some post-processing effects to work, FSR2 will use an alternate texture at internal size to use as the screen texture read by shaders instead. The rendering pipeline will prefer using this texture if it exists.
325623d
to
4890e96
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Tested locally and can confirm that it fixes the issue
// dedicated backbuffer copy texture instead if the blur texture is not an option so shader effects work correctly. | ||
Size2i target_size = rb->get_target_size(); | ||
bool using_fsr2 = (rb->get_scaling_3d_mode() == RS::VIEWPORT_SCALING_3D_MODE_FSR2); | ||
bool internal_size_matches = (size.width == target_size.width) && (size.height == target_size.height); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bool internal_size_matches = (size.width == target_size.width) && (size.height == target_size.height); | |
bool internal_size_matches = (size == target_size); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed this when merging from command line. Could be tweaked next time surrounding code is modified.
Thanks! |
Fixes #83152. Due to how BLUR_0 is reused for multiple purposes and requires being at native resolution for some post-processing effects to work, FSR2 will use an alternate texture at internal size to use as the screen texture read by shaders instead. The rendering pipeline will prefer using this texture if it exists.
Anything that used screen textures inside a custom shader was affected when FSR2 was enabled with a resolution scale below 1.0.