Skip to content
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

Sync with Q2PRO: Water warp effect #376

Merged
merged 8 commits into from
Feb 21, 2024

Conversation

res2k
Copy link
Contributor

@res2k res2k commented Feb 8, 2024

Upstream added a "water warp" effect to the GL renderer. This adds the same effect to the RTX renderer.

The principle is the same; the water warp is applied as the last step after rendering the view.
I opted to do this in the "final blit" step; the "final_blit_lanczos" shader was turned into a more generic "final_blit" shader, with lanczos filtering and warping controllable via specialization constants. (It's now also used for a "simple blit", ie both filtering and warping is turned off.)

@apanteleev
Copy link
Collaborator

Thanks @res2k - I'm not sure why someone would want to make playing underwater even more difficult, but if q2pro has this effect, why not. :)

I tested the effect, and it looks good, but there's one issue: when DRS is enabled and drs_maxscale > 100, there is a wavy black border at the right and bottom edges of the screen.

@res2k
Copy link
Contributor Author

res2k commented Feb 17, 2024

Thanks @res2k - I'm not sure why someone would want to make playing underwater even more difficult, but if q2pro has this effect, why not. :)

Actually, this effect was a feature of original Quake II, back when it shipped - albeit in the software renderer only, as it wasn't feasible with the 3D accelerators back then.
So you could see this as actually restoring a feature ;)

I tested the effect, and it looks good, but there's one issue: when DRS is enabled and drs_maxscale > 100, there is a wavy black border at the right and bottom edges of the screen.

Fixed it with some clamping.

Also added menu entries for warping.

Lastly, I noticed some "border weirdness" when FSR is enabled... but this seems to be more an FSR thing than warping, so I'll look into that separately.

@apanteleev apanteleev merged commit 6b4c6c8 into NVIDIA:master Feb 21, 2024
2 checks passed
@res2k res2k deleted the q2pro-sync-waterwarp branch January 1, 2025 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants