Next Generation Emulation banner

1 - 20 of 1126 Posts

·
Registered
Joined
·
128 Posts
Discussion Starter #1 (Edited)
PGXP (Parallel/Precision Geometry Transform Pipeline) is an enhancement for PlayStation emulation that produces high precision fully 3D geometry data that was not available on the original console hardware.

It is currently integrated with PCSX-Reloaded via Pete's OpenGL v1.78 plugin and Tapeq's Tweak extension to Pete's OpenGL v2.9 plugin.

Note: This project is still very much a work in progress.

Features
  • High Precision Vertex Data (more stable geometry)
  • Reduced Triangle Culling (more detailed models)
  • Perspective Correct Texture Mapping (reduced texture distortion)

Chrono Cross: Distortion of model geometry is significantly reduced, especially at a distance.


Ridge Racer Type 4: Higher precision culling calculations mean that small triangles are no longer culled


Tomb Raider: 3D vertex coordinates mean affine texture mapping can be replaced by perspective correct mapping

Setup Instructions
Download the required files (links to these can be found below):
  • A WIP build of PCSXR-PGXP
  • A complete install of PCSX-Reloaded
  • Pete's OpenGL2 PSX GPU Plugin v2.9
Copy the PCSXR-PGXP.exe file from the WIP build to the root folder of the PCSX-Reloaded (the one with the PCSXR.exe file in it). Then copy the gpuPeopsOpenGL.dll and gpuPeteOpenGL2Tweak.dll files to the "Plugins" folder.

If you don't already have it copy the "gpuPeteOpenGL2.dll" file to the Plugins folder too (this is required for the Tweak plugin to work).

Note: If the plugins fail to appear in the "Graphics" menu of the "Plugins & Bios..." window then you may need to install the Visual C++ Redistributable 2015 (x86).

Debug Visualisations
Various shading modes are available by pressing F11 when using the OpenGL 1.78 plugin each of which show different information regarding vertices. There are currently three such modes that can be cycled through, the first shows the different states of each vertex:
  • Blue: Successfully tracked from transformation on the GTE to the GPU.
  • Cyan: Tracked but has lost its 'w' component.
  • Yellow: The vertices belong to a 2D sprite element.
  • Red: No valid value was found so it falls back on the native low precision values.
  • Green: A suitable high precision value has been found in the cache
  • Magenta: Multiple high precision values were found at the same position of the cache, making the result ambiguous, so the low precision value is used.
The other two modes display depth values as a spectrum through blue, green and red. The second mode being the 'w' components of the vertices (in older versions this was grey scale).

The last shows depth information taken from the Ordering Table used by the PlayStation to sort primitives so they can be rendered from furthest to nearest.

Links
Most Recent Builds:
WIP_PGXP_build_19_03_02.zip


Source Code:
PCSXR-PGXP: https://github.com/iCatButler/pcsxr
Tapeq's OpenGL Tweak Plugin with PGXP: https://github.com/iCatButler/PeteOpenGL2Tweak

Additional Links:
Official PCSX-Reloaded Home Page: https://pcsxr.codeplex.com/
Pete's OpenGL2 PSX GPU Plugin: http://www.pbernert.com/html/gpu.htm#OGL2
Visual C++ Redistributable 2015: https://www.microsoft.com/en-us/download/details.aspx?id=48145
Visual C++ Redistributable 2010 (may be needed for other plugins): https://www.microsoft.com/en-gb/download/details.aspx?id=5555
Tapeq's Tweak Plugin Thread: http://ngemu.com/threads/peteopengl2tweak-tweaker-for-peteopengl2-plugin-w-gte-accuracy-hack.160319/

Previous Builds:
WIP_PGXP_build_18_12_16.zip

WIP_PGXP_build_17_04_25.zip
WIP_PGXP_build_17_03_19.zip
WIP_PGXP_build_16_08_01.zip
WIP_PGXP_build_16_08_31.zip
WIP_PGXP_build_17_03_17.zip


Thanks to:
Tapeq
Pete Bernert
Edgbla
Simias
The PCSX-R team
And everyone who has provided feedback.
 

·
Registered
Joined
·
1 Posts
Very impressive work! It's running great with many of the games I've tested it with, really improves how it looks.
Kinda odd to see a racing game with straight lines :p

Just wanted to note, with Hydro Thunder, the hack does not work at all.
According to F11 debugging, everything shows up as red, even with Recompiler/Interpeter or Memory/Memory+CPU
Enabling Vertex Cache will get things flickering madly as green/red/magenta and generally breaks the graphics massively.

 

·
Registered
Joined
·
308 Posts
This is great! Having an exclusive thread is much better! To commemorate (kinda XD) I made a video showcasing Medal of Honor in the latest WIP:
This game works great using "Memory only" mode on PGXP. Only the sky seems to be low precision, but I guess that's a skybox, maybe just a big 2D texture.

About the internal frames per second, I don't know if it's a bug with Pete's OpenGL2 2.9 plugin (which the TWEAK uses as its base), or if the plugin fixes a timing issue (?) with this game, because parts with no enemies run at 60 FPS, while parts with enemies run at 30 FPS. The corridors with leaf fences at both sides also run at 30 FPS. The OpenGL 1.78 makes the game run at a constant 30 FPS. This is the emulator running without overclock; with it, the parts that run at 60 FPS are more "constant", without common deeps to 55-50 FPS. This also happens on ePSXe's OpenGL 2 "core plugin", so maybe that's the correct behavior? And since people say Mednafen is the most accurate PSX emulator, I tried it with that, and it runs at a constant 60 FPS XD. I don't know what's going on, but at least it's very playable.
 

·
Registered
Joined
·
106 Posts
@iCatButler please, update the main post with the vc_redist.x86 link, before people make the same questione over and over again!

Otherwise, on emucr there is a build from your github updated with the 64bit dynarec; just to let you know.
 

·
Registered
Joined
·
308 Posts
Here's Crash Bandicoot 3: Warped.
Although there's an issue, where at a distance "holes" will appear on the ground (like what the old GTE accuracy hack did on some games), the character models and the rest of the scenario are high precision, using "Memory only" mode.

This game does not work very well with the widescreen hack, but it's not as bad as Crash 1 and 2. I preferred to record this using the hack anyways, because that big overscan in the NTSC version is just stupid in 4:3, so the game will look kinda of "cinematic" in widescreen XD (XMedia Recode gives me an aspect ratio of 1.9692). I think since the Crash games are 3D "corridor" platformers, there was no need to create more scenario where the player would never get to explore, so the original PSX trilogy might never get a proper widescreen method, even if the widescreen hack is improved someday. Unless someone discovers a way to change the FOV, and also re-position Crash so that he is further on the field, than maybe a vert- method would work... just dreaming though.

I do hope Sony does a good job on remaking these games, because as emulation already shows, remasters might not work very well.
 

·
Registered
Joined
·
46 Posts
I tried MGS1 and Chrono Cross yesterday even just with memory PGXP looked really awesome. MGS1 with Memory + CPU looked even better. I had some brief slowdown, but just in one part. Outside of the Shadow Moses base looked incredible :)
 

·
Registered
Joined
·
128 Posts
Discussion Starter #11
@SolisX Hi! Good idea, I've put a few comparisons in the first post to illustrate the differences. I'll probably put together a video at some point as the difference in motion is even more stark. I've included a couple more images that I put together.

This one shows just how distorted some models can get, the vertices effectively snapping to a square grid.

The distortion effect on faces is also pretty striking.
@gamax92 I suspect Hydro Thunder is writing individual bytes, PGXP currently only tracks 16 and 32-bit reads and writes because vertex coordinates are stored as two 16-bit values.

What's happening when the cache is enabled looks like random false positives. There are vertices being transformed and added to the cache but not at their final screen space positions, so when GPU plugin does a lookup it's sometimes finding a value but probably not the right one.

@otherman good point about the VC++ redistributable, I've added it in now. The 64-bit dynarec is only used in the linux and MacOS versions, the Windows solution only includes the x86 version, I updated it to help CarterLi on GitHub build for Mac.
I did get it working for Windows locally, with a lot of hacking about, but there seemed little point to releasing that version as most of plugins available are only compiled for 32-bit.

@TheDimensioner I've noticed those holes in Crash 3, unlike other cases I can't seem to influence those by modifying NCLIP, although the game does seem to use it for back face culling. I can only assume those gaps are either in the original mesh or being created as part of the tessellation/LoD system before the vertices are transformed.
 

·
Registered
Joined
·
9 Posts
iCatButler
Is it possible to call the "Reduced Triangle Culling" feature in some sense an analogue of the tessellation? After all, judging by the screenshots, the final result is similar to tessellation - the models are more detailed.
 

·
Registered
Joined
·
308 Posts
Hah, the "widescreen cheat" for Crash 3 works!
Although there are much more issues than with the hack XD. The area shows more on the sides on some parts, but there are those sudden stretches of the characters and camera hiccups. The UI is also stretched, unlike with the widescreen hack, although it's only for this game.

I "forced" 30 FPS for this recording, that's why the music plays faster sometimes. Isn't there a 60hz code for the PAL version of this game? Like I said in the Tweak's thread some times, PAL versions have less overscan, or none at all, generally showing a little more of the screen. But they're mostly 25/50FPS, which I'm not used to. So a hack or a patch for 60hz would be nice.
 

·
Registered
Joined
·
128 Posts
Discussion Starter #15 (Edited)
Is it possible to call the "Reduced Triangle Culling" feature in some sense an analogue of the tessellation? After all, judging by the screenshots, the final result is similar to tessellation - the models are more detailed.
The default behaviour of the PlayStation is a sort of reverse tessellation, or implicit mesh simplification. This image illustrates what's happening quite well.
All the triangles are being transformed but the low precision results in many vertices of small triangles getting the same position. This causes those triangles to collapse into lines or points, becoming degenerate, with an area of zero.
You can see this happening in the image where groups of small triangles form simple squares, two or three triangles stretch as their vertices snap to the same few points while other triangles disappear altogether.

The PlayStation's GTE has a function to cull these degenerate triangles called NCLIP which also removes triangles that are facing away from the viewer (back-face culling). As PGXP calculates and stores vertices in high precision the implicit simplification doesn't happen but the default NCLIP behaviour still results in small triangles, that would have become degenerate, being culled. This is because the emulated game expects a low precision integer value which will be truncated to 0 for many small triangles.

To solve this PGXP calculates its own NCLIP result in high precision and then intentionally skews the results so that values that would become 0 are now rounded up to 1 or -1 before passing it back to the emulator. So technically, rather than creating more triangles from a mesh, it is preserving existing triangles that would otherwise be simplified out.
 

·
Registered
Joined
·
308 Posts
Showing Resident Evil: Survivor. This time I made 2 videos, one with PGXP and other enhancements (xBRZ and shaders), and another without PGXP and no enhancements (besides high internal resolution). I think this game is great for showing PGXP, because it has many detailed textures in the walls and floors. Without PGXP, the slightest movement of the camera distort everything, and on cutscenes, you can really see how bad the character models "tremble" (the last custcene in the no PGXP video is the worse). "Memory only" mode works very well here, although there are still some parts where the floors will "auto-align" as you walk on them, and also some "stair loading screens" with wobbly steps.

Resident Evil: Survivor, PGXP enabled

PGXP disabled, no enhancements

@iCatButler, if it interests, you could use these two videos on the first post, because I think they show really well what PGXP does. I know it would be best if it were one video showing each footage side-by-side, but I don't know how to do that XD. I'm not suggesting this for views or anything, I just think that PGXP is great, and it has to be known by its greatness (also you as the author :D)! A better game would attract more attention though XD.
 

·
Registered
Joined
·
308 Posts
GTA 2 doesn't work with PGXP XD. I was thinking if this was similar to DOOM, as it's not actually 3D, but using "Mem + CPU logic" mode stretches everything, like it did with most games I played before, so maybe the buildings are 3D.

PGXP "Memory only" mode:
pcsxr0001.png
pcsxr0002.png
PGXP "Mem + CPU logic" mode:
pcsxr0003.png
pcsxr0004.png
 

·
Registered
Joined
·
81 Posts
GTA 2 doesn't work with PGXP XD. I was thinking if this was similar to DOOM, as it's not actually 3D, but using "Mem + CPU logic" mode stretches everything, like it did with most games I played before, so maybe the buildings are 3D.

PGXP "Memory only" mode: PGXP "Mem + CPU logic" mode:
Does the Perspective Correct Texturing not work with GTA? Those textures are so wobbly lol
 
1 - 20 of 1126 Posts
Top