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

GS/HW: Implement RT in RT support #11461

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open

Conversation

refractionpcsx2
Copy link
Member

@refractionpcsx2 refractionpcsx2 commented Jun 25, 2024

Description of Changes

Adds support for render target inside render target draws and shuffles, where games point to an offset inside a previously drawn target, usually to update single pages, or offset half way through a picture.

Rationale behind Changes

We didn't support this and relied on exact start address matches, and a bunch of games do it.

Suggested Testing Steps

Test games which had "top left corner" bugs or weird half screen problems.

Known to fix:
Battlefield 2 - Fixes things the CRC hack was chopping out, also required fixing how sources get invalidated
Big Mutha Truckers - No longer requires a CRC hack for half screen shuffle
Call of Duty - World at War - Final Fronts - lighting closer matches software
Conflct Desert Storm - Flickering fixed
Death by Degrees - lighting and fog effects post processing (top left corner) are fixed (CRC can be removed)
Delta Force - Black Hawk Down - Fixes player 2 night vision
Drakengard - Post shuffle effect on death
Driv3r - Doesn't need such a cacophony of fixes, just CSBW 4/2 + Tex in RT, plus fixes the sun glares.
Haunting Ground - Quite possibly no longer needs CRC hack
Hitman Blood Money - Post processing and shadows fixed (still needs CRC for weird corner uploading thing, but may be more fixable these days)
Hitman Contracts - Graphics completely fixed
Ghost in the Shell - Stand Alone Complex - No longer requires CRC hack and fixes channel shuffle
Jak X - Combat Racing - Player 2 now visible
Peter Jackson's King Kong- The Official Game of the Movie - pretty much fixed with rt in rt
Manhunt 2 - Post Process (top left corner) lighting fixed
Onimusha - Warlords - fmvs seem to not flicker (game currently uses SW FMV)
Ridge Racer V - Less hacks required, intro can now be upscaled
Sniper Elite - Second player lighting overlay fixed
Stolen - All graphics processing is fixed, lighting, etc. Speed is also not terrible
Spiderwick Chronicles - Half screen problem in book fixed
Suikoden III - Half screen black and white effect fixed
SWAT - Global Strike Team - Player 2 colours corrected
Taiko no Tatsujin Bang Tap - Lighting overlay (top left corner) fixed
Tekken 5 - Fire effect can now be used upscaled and half screen fire effect problem is fixed
TOCA Race Driver 2 - shadows fixed
Time Crisis 3 - Post processing looks correct now
Tomb Raider - Legends - Fixes for post lighting effects not covering the screen in some levels and goggles
Wild Arms 5 - No longer requires Framebuffer Conversion hack ,meaning sepia scenes now upscale properly
Wrath Unleashed - Fixes colours
WRC 3 - Half screen fog effect fixed.

Improves but doesn't currently fix:
Pachipara
Raw Danger
Steambot Chronicles

All the above games will likely need a further CRC to fix the remaining issues due to a weird shuffle and manual deswizzling of depth.

Note: This is gated behind Tex in RT and will break some games if left on, be it on your own head!

Fixes #11417 - Battlefield 2
Fixes #11416 - Battlefield 2
Fixes #8869 - Battlefield 2
Fixes #11085 - Death by Degrees
Fixes #3855 - Drakengard
Fixes #10399 - Hitman - Contracts
Fixes #4251 - Hitman - Blood Money
Fixes #12215 - Jak green sage's eyes
Fixes #4964 - Jak X - Combat Racing
Fixes #11870 - King Kong
Fixes #10164 - Manhunt 2
Fixes #8574 - Ridge Racer V coloured light problem
Fixes #8328 - Stolen
Fixes #3849 - Suikoden 3
Fixes #10471 - SWAT Global Strike Team
Fixes #8995 - Tekken 5
Fixes #7942 - Time Crisis 3
Fixes #913 - TOCA Race Driver 2
Fixes #267 - Wrath Unleashed
Fixes #10982 - WRC 3
Fixes #9888 - Conflict Desert Storm
Fixes #11965 - Delta Force - Black Hawk Down

Screenshots

Battlefield 2:
Master:
image
PR:
image

Call of Duty - World at War:
Master:
image
PR:
image

Death by Degrees (in native as the fog doesn't upscale well, even with fixes):
Master:
image
PR:
image
Upscaled on PR just to show:
image

Delta Force - Black Hawk Down:
Master:
image
PR:
image

Drakengard:
Master:
image
PR:
image

Hitman - Blood Money:
Master:
image
PR:
image

Hitman - Contracts:
Master:
image
PR:
image

Ghost in the Shell:
Master:
image
PR:
image

Jak and Daxter - The Precursor Legacy:
Master:
image
PR:
image

Jak X - Modern Combat Racing:
Master:
image
PR:
image

Peter Jackson's King Kong:
Master:
image
PR:
image

Manhunt 2:
Master:
image
PR:
image

Ridge Racer V (Intro, to show upscaling now works):
Master:
image
PR:
image

Sniper Elite:
Master:
image
PR:
image

Stolen:
Master (Had to take this twice because it flashes black ever other frame:
image
PR:
image

Spiderwick Chronicles:
Master:
image
PR:
image

Suikoden III:
Master:
image
PR:
image

SWAT - Global Strike Team:
Master:
image
PR:
image

Taiko no Tatsujin Bang Tap (in Native res as it doesn't upscale well):
Master:
image
PR:
image

TOCA Race Driver 2:
Master:
image
PR:
image

TOCA Race Driver 3:
Master:
image
PR:
image

Time Crisis 3 (Native as it doesn't upscale great):
Master:
image
PR:
image

Tomb Raider Legends:
Master:
image
PR:
image

Wild Arms 5 (To show it now upscales):
Master:
image
PR:
image

Wrath Unleashed:
Master:
image
PR:
image

WRC 3 (Fog on the left):
Master:
image
PR:
image

@TheTechnician27
Copy link
Contributor

Fixes #11417.

@JordanTheToaster
Copy link
Member

Fixes #10982

@refractionpcsx2 refractionpcsx2 force-pushed the gs_rtinmyballs branch 3 times, most recently from 52e7712 to afc0c25 Compare January 17, 2025 11:09
@someother1n
Copy link

Fixes #1339 (comment)

Master:
mstr

PR:
PR

@refractionpcsx2
Copy link
Member Author

Thanks for checking, I actually have a preliminary "fixes" list, which is as follows

Big Mutha Truckers - No longer requires a CRC hack for half screen shuffle
Death by Degrees - lighting and fog effects post processing (top left corner) are fixed (CRC can be removed)
Driv3r - Doesn't need such a cacophony of fixes, just CSBW 4/2 + Tex in RT
Hitman Blood Money - Post processing and shadows fixed (still needs CRC for weird corner uploading thing, but may be more fixable these days)
Hitman Contracts - Graphics completely fixed
Jak X - Player 2 now visible
King_Kong_Peter_Jacksons - The Official Game of the Movie - pretty much fixed with rt in rt
Knights of the temple - now needs tex in rt
Manhunt 2 - Post Process (top left corner) lighting fixed
Onimusha - Warlords - fmvs seem to not flicker (game currently uses SW FMV)
Sniper Elite - Second player lighting overlay fixed
Stolen - All graphics processing is fixed, lighting, etc. Speed is also not terrible
Spiderwick Chronicles - Half screen problem in book fixed
Suikoden III - Half screen black and white effect fixed
SWAT - Global Strike Team - Player 2 colours corrected
Taiko no Tatsujin Bang Tap - Lighting overlay (top left corner) fixed
Tekken 5 - Fire effect can now be used upscaled and half screen fire effect problem is fixed
TOCA Race Driver 2 - shadows fixed
Time Crisis 3 - Post processing looks correct now
Tomb Raider - Legends - Fixes for post lighting effects not covering the screen in some levels and goggles
Wrath Unleashed - Fixes colours
WRC 3 - Half screen fog effect fixed.

Also add an override for GSVector4i loadl to take a GSVector2i
- Channel shuffles now check how many pages require drawing before doing the shuffle.
- Split texture shuffles don't create new targets with bad valid areas.
- this should be okay/limited to certain situations like Battlefield 2. Scissor isn't 100% guaranteed to be right, but it's probably better than nothing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment