Guide to Ray Tracing with Reshade
- Duran.te
- Topic Author
If, on one hand, it made some nerd's innermost dreams come true, on the other it brought a lot of confusion, skepticism and doubts to many other people. With this guide I hope to shed some light on this.
If you are new with Reshade, it's highly recommended that you first take a look at both Reshade comprehensive guide for newcomers and Easy troubleshooting guide , to help you to get over the first steps.
Ray Tracing is a rendering technique known for years in Computer Graphics that aims to produce physically correct 3D scenes.
In real life any light source emits a tons of rays. These rays travel till they reach an object, where they'll bounce from countless times to any other object in the ambient bringing with them informations like color or light, until they eventually reach our eyes.
Ray Tracing works more or less in the opposite way: Rays are sent starting from the digital camera and, once they meet an intersection point, they send new rays to every light sources.
Path Tracing work in a similar way, but, once rays reach an intersection point, they act more in a life-like way: They keep bouncing through objects getting more precise informations till they reach light sources.
This technique's not much cheap, tho. What we are witnessing, so, are Nvidia's first experiments of games featuring hybrid rendering: While games are still rendered with the conventional methods (rasterization), Ray Tracing is getting used just to calculate some graphics elements, like shadows (Shadows of the Tomb Raider), reflections (Battlefield V) or global illumination (Metro Exodus).
Global Illumination (GI for friends) is a plenty of Maths and Algorithms meant to simulate real life's light bounces through the ambient.
Until now Global Illumination was achieved in several different ways, each one with its own limitation.
Developed by Pascal "Marty McFly" Gilcher, PTGL (Path Traced Global Illumination) is an upcoming shader for ReShade which make use of Path Tracing to bring Real Time Global Illumination to every games.
GI's certainly not something new for games, but, unlike conventional Baked / Precomputed Realtime GI, Marty McFly's Path Traced solution can provide a way more realistic and physically correct Global Illumination for every games.
The mod needs Reshade to be properly installed in your game to work.
For this reason I encourage you again to take a look at Reshade comprehensive guide for newcomers for a quick guide of how to install Reshade, and the Easy Troubleshooting Guide for a full guide of general issues you can encounter while dealing with Reshade.
You can find both of these guides in the bolded line on top of this topic, before the quick explenation of what Ray Tracing is.
Supposing you achieved to install Reshade correctly, to download the mod join Marty McFly's PG Hub discord server and locate the "Patreon" channel where you can pick the latest version of the mod.
Remember that you need to join a proper Patron's tier to try the early access version of the mod. Check the "Frequently Asked Questions" below to find out more.
Once you downloaded the mod, open the compressed .zip file (read the "license agreement.txt"), then copy and overwrite both "Shader" and "Textures" in your game's Reshade folder (game path > reshade-shaders) and you're done.
Please Note: Reshade needs depth buffer access to make the mod work. More infos on "Easy Troubleshoting" guide.
Please Log in or Create an account to join the conversation.
- Duran.te
- Topic Author
Is this real Ray Tracing?
This question probably comes from the comparison people are making with Nvidia's Ray Tracing technique, since it takes advantage of out of screen information to deliver accurate results.
Marty McFly's shader is hooked to informations provided by ReShade (depth buffer). The end result is a Screen Space Ray Tracing calculation, just like Unigine SSRTGI (Ray Traced Global Illumination), which indeed is a form of Ray Tracing.
If you still have doubts on this point, I'll be happy to have a peacefully discussion about it.
Which games are supported by this shader?
Unlike Nvidia's solutions, this shader is not restricted to a limited amount of games.
Any game where Reshade can get depth buffer from is supported.
That's the power of generic post processing!
RTX GPU related questions
-Do I need an Nvidia RTX card to make it work?
No, you will be able to use this with any cards, including any AMD card or "old" Nvidia's GTX series.
-Will I get benefits in terms of performance with an RTX card?
No, this shader can't make use of RT cores from newest Nvidia GPUs' architecture to make it perform better.
How can I try it?
Right now, the shader's still work in progress, and it's not available for the public yet.
Once it reach its final build, it will be available to anyone for free.
Early access versions of this shader are available on Pascal Gilcher Patreon's page.
The shader's actually in beta stage. If you wanna try it right now, you'll need to join the $5 tier.
Patreon's rewards are the following:
$1 Tier - "Supporter"
Get access to Patron-only channels on discord server.
$5 Tier - "Beta Supporter"
Get access to beta state of Pascal's works, including the RT shader. Plus, the benefit above.
$20 Tier - "Alpha Supporter"
Get access to alpha state of Pascal's works, including the RT shader. Plus, the benefits above.
Pascal Gilcher Patreon page: www.patreon.com/mcflypg
[hr]
How to improve Performance
Real time Path Traced Global Illumination rendering is an exhausting work for any hardware. This inevitably leads to a huge impact of performance.
The first parameters to look at for quality / performance ratio are "Ray Amount" and "Ray Step Amount".
The higher the Ray Amount values, the less noisy and temporally stable results.
The higher the Ray Step Amount values, the more defined GI quality.
Use the following scheme as a reference for a generic quality-price ratio:
PERFORMANCE
Ray Amount: 3
Ray Step Amount: 6
BALANCED
Ray Amount: 3
Ray Step Amount: 9
QUALITY
Ray Amount: 5
Ray Step Amount: 12+
GI Render Resolution Scale is responsable for internal GI resolution and, by default, allows you to set it to full scale ( 1 ) or half of it ( 0.5 ). You can still manually change it to a custom value by holding "ctrl" while clicking on the parameter. For example, if you wanna lower resolution down by 1/3, type 0.75. Values above 1.0 will cause visual artifacts.
Other than that, Spatial Filter is a filter set among the Preprocessor Definitions. It will trade a tiny bit of precision and performance for high quality denoising. Set it off you are desperately looking for more performances.
To do that, click on "Edit Global Preprocessor Definitions", add a new definition, name it SPATIAL_FILTER and set its value to 0.
The image is getting over-saturated
A saturation slider is currently on the author's to-do list.
Meanwhile, use any saturation-controlling shader to fix this problem and, in case, drag it below the RT shader.
Shader passing through in-game elements (fog / water ...)
This is a common issue that affects all depth-based shader, included RT Global Illumination.
It's due to the generic post-processing nature of Reshade, and unfortunately not much can be done about that.
A way to make it less obvious is making the shader more subtle:
-Reduce Ambient Occlusion and Indirect Light Intensity
-Reduce the Filter Sensitivity (values under 0.100 are not reccommended)
-Apply a grading after RT Global Illumination. It can help to blend the shader with the game.
The shader enable a weird red-ish tint
This was an issue with the pre-beta shader. It was caused by the default preset of Sky Color.
In case you're getting this issue, you're using an older version of the mod. The updated one will be in the "Patreon" channel of Marty's PG Hub discord server.
Sky Color, by the way, is one of the tweakable values of the shader.
Since Reshade can't provide out of screen color / luminosity infos, this value was added as a way to fake them.
Keep in mind that Sky Color is hooked to Indirect Light Intensity, so it's easy to mess things up. Lower / Darker Sky Color values are recommended.
In case of doubt, set all RGB values to 0.
Halos around objects
In post processing there's not a way to calculate how thin or thick objects are. You'll have to use an approximate general value.
Move the slider Z Thickness to a point where you won't see halos anymore.
The effect persist for a bit in motion
It's called Ghosting . It's a side effect to deal with in generic post processing.
The author of the mod is currently working to reduce this effect and make it less distracting.
Turning on the Spatial Filter preprocessor definition seems to alleviate ghosting a bit.
Please Log in or Create an account to join the conversation.
- Riadon
Please Log in or Create an account to join the conversation.
- Duran.te
- Topic Author
I'll provide to add these information also, as detailed as possible, as soon as I can.
Unfortunately, being a student and not being able to afford economic support to Pascal's work, doesn't help me in making this guide.
I'll keep searching online infos about it.
Please Log in or Create an account to join the conversation.
- Uncle Crassius
Also because I just noticed "The more ray amount you have, the less noise you get." should be "The higher the ray amount [...]". But keep up the good work.
Please Log in or Create an account to join the conversation.
- Duran.te
- Topic Author
Patreon information was added, as well as the "ray amount" line was corrected.
Riadon's performance advice are now included.
Please Log in or Create an account to join the conversation.
- reter
Please Log in or Create an account to join the conversation.
- Insomnia
I see a lot of videos on YouTube where the AO causes "halos" around characters and such. Is that a ReShade issue or a shader issue?
Please Log in or Create an account to join the conversation.
- Duran.te
- Topic Author
Halos can be caused either by in-game ambient occlusion left on, which may emphasize this side effect, or, more likely, by incorrect shader settings: it was added an additional option, "Z Thickness", to estimate the thickness (duh) of 3d entities and thus prevent halos.
Please Log in or Create an account to join the conversation.
- PureEvilWindom
Please Log in or Create an account to join the conversation.
- Duran.te
- Topic Author
I could take some shots from Marty's discord server, but I'd need to ask someone to specifically do this work, and get permissions from them to post their shots here.
Please Log in or Create an account to join the conversation.
- uKER
Did you just make that up?
qUINT and Pascal's raytracing shader are two entirely different things, as noted in his personal page.
www.patreon.com/mcflypg
Please Log in or Create an account to join the conversation.
- Duran.te
- Topic Author
I'll probably need to include that in my revisiting of this guide.
Please Log in or Create an account to join the conversation.
- p6kocka
Please Log in or Create an account to join the conversation.
- Duran.te
- Topic Author
Plus, you'll get a double occlusion obscurance sub effect you wanna avoid when in-game AO is left on. The same arguments applies to the in-game Global Illumination.
So yeah, it's recommended to turn both of them off, if the game allows you to do so.
Note that some games may need you to make specific tweaks to turn these effects off, like edit some Windows configuration file or type a command in the in-game console (Crysis).
Please Log in or Create an account to join the conversation.
- Rayman_77
shader Beta 5,000 default.
Please Log in or Create an account to join the conversation.
- Duran.te
- Topic Author
If you don't mind loosing some details on smaller intersections while giving it a wider shady look, feel free to raise it up. Otherwise keep it to a lower value.
How you decide to tweak this value is really up to your personal tastes.
Please Log in or Create an account to join the conversation.
- Lost Alpha
Anyone else have the same flickering error in STALKER Lost Alpha DC with RTGI?
Please Log in or Create an account to join the conversation.
- Lost Alpha
Please Log in or Create an account to join the conversation.
- Duran.te
- Topic Author
Try playing with depth settings in your last tab of reshade while using the DisplayDepth shader till you pick the right one.
Also, TheGordinho mentioned that the game might have some form of anti-aliasing on. If that's the case, turn that off.
Please Log in or Create an account to join the conversation.