Welcome, Guest.
Username: Password: Remember me

TOPIC: Guide to Ray Tracing with Reshade

Guide to Ray Tracing with Reshade 5 months 2 weeks ago #1


Thanks to our green-ish fellas from Nvidia, the "Holy Grail" of real time rendering, aka Ray Tracing, is now on everyone's lips.
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.


What is Ray Tracing?

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 in a simple 3D scene -  Notice how indirect colored light spreads across the enviroment

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.


Installation

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.

Official Schedule
  • Improve skycolor detection, move sky visibility to alpha channel to remember past skycolor but attenuate it if indoors for a while. Possibly replace skycolor with grey skycolor to make ambient mix work when no skycolor is detected
  • Experiment with compressing normal buffer to maybe increase performance there, RGBA8 with basically one unused color channel -> RG8 should help a bit, if compression is mip map stable
  • Microoptimization
  • Reduce texture usage
Last Edit: 2 weeks 3 days ago by Duran.te.
The administrator has disabled public write access.
The following user(s) said Thank You: Tom Yum 72, jas01, Fu-Bama, Matt Gore, someone_for, romulus_ut3

RT Guidebook - A ray traced Guide to Ray Tracing 5 months 2 weeks ago #2

Frequently Asked Questions

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


Troubleshooting

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.


Image shot during motion. Ghosting occurs on the left side of the weapon and the barrel
Last Edit: 2 months 1 week ago by Duran.te.
The administrator has disabled public write access.
The following user(s) said Thank You: jas01, Insomnia, Fu-Bama, romulus_ut3

RT Guidebook - A ray traced Guide to Ray Tracing 5 months 1 week ago #3

I would add that you can also play around with the miplevel for both the AO and IL in the shader file for very noticeable performance benefits. The "infinite bounces" parameter is pretty interesting as well, but very demanding.
Last Edit: 5 months 1 week ago by Riadon.
The administrator has disabled public write access.

RT Guidebook - A ray traced Guide to Ray Tracing 5 months 1 week ago #4

Thanks for the advice!
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. :lol:
I'll keep searching online infos about it.
The administrator has disabled public write access.

RT Guidebook - A ray traced Guide to Ray Tracing 5 months 1 week ago #5

Great guide. I'd clarify that it's currently only available to alpha backers in the 20$ tier. Though that's already implied by mentioning the shader being in alpha state the line "The alpha version of this shader is avaiable to all Pascal "Marty McFly" Gilcher's patreons" sounds like someone might think 1$ is enough. Deffo not available to "all" patrons.
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.
The administrator has disabled public write access.

RT Guidebook - A ray traced Guide to Ray Tracing 5 months 1 week ago #6

Thanks, Uncle Crassius!
Patreon information was added, as well as the "ray amount" line was corrected.
Riadon's performance advice are now included.
Last Edit: 5 months 1 week ago by Duran.te.
The administrator has disabled public write access.

RT Guidebook - A ray traced Guide to Ray Tracing 4 months 2 weeks ago #7

So marty is still working on it? i heard that he dropped the project to focus on ray tracing on enb
The administrator has disabled public write access.

RT Guidebook - A ray traced Guide to Ray Tracing 3 months 2 weeks ago #8

Great guide!! Wish more people could read this as many confuse ReShade with Nvidias RTX stuff.

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?
The administrator has disabled public write access.

RT Guidebook - A ray traced Guide to Ray Tracing 3 months 1 week ago #9

Yeah, I saw them too.
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.
The administrator has disabled public write access.
The following user(s) said Thank You: Insomnia

Ray Tracing with Reshade - Unofficial Guide 2 months 3 weeks ago #10

any side by side comparison RT Shader vs actual RTX ray tracing ?
The administrator has disabled public write access.
The following user(s) said Thank You: jonathan1107

Ray Tracing with Reshade - Unofficial Guide 2 months 3 weeks ago #11

As I answered before, I don't have access to the shader. Despite I'd be glad to support his (and all reshade's team) work, I can't afford it. The guide's gonna be updated once I'll get my hands on the shader.
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.
The administrator has disabled public write access.

RT Guidebook - A ray traced Guide to Ray Tracing 2 months 2 weeks ago #12

Huh? qUINT-RT?
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
The administrator has disabled public write access.

RT Guidebook - A ray traced Guide to Ray Tracing 2 months 2 weeks ago #13

Actually, the file's name is "qUINT_rt.fx" and it needs the "qUINT_common.fxh" file to work, so it's reasonable to think that, eventually, it's gonna be included in the qUINT collection, too. Moreover, if you notice in his Patreon's page, both MXAO and Lightroom are defined separately as well, when in fact they're both part of the qUINT collection.
I'll probably need to include that in my revisiting of this guide.
The administrator has disabled public write access.

RT Guidebook - A ray traced Guide to Ray Tracing 2 months 2 weeks ago #14

Is it recommended to disable the ingame ambient occlusion for better visual experience? I mean when usin reshade rt shader.
Last Edit: 2 months 2 weeks ago by p6kocka.
The administrator has disabled public write access.

RT Guidebook - A ray traced Guide to Ray Tracing 2 months 2 weeks ago #15

Ray Traced Global Illumination's Ambient Occlusion will always provide superior results compared with any games built in AO solution (SSAO, HBAO, GTAO...).
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).
The administrator has disabled public write access.

RT Guidebook - A ray traced Guide to Ray Tracing 1 month 2 weeks ago #16

Is Ray length good to leave at 5,000?

shader Beta 5,000 default.
The administrator has disabled public write access.

RT Guidebook - A ray traced Guide to Ray Tracing 1 month 2 weeks ago #17

There's not a fixed value for it, as it behaves differently from game to game.
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.
The administrator has disabled public write access.

RT Guidebook - A ray traced Guide to Ray Tracing 4 weeks 2 days ago #18

Hi, I have a question, what does RT work depend on? He used to work in the Stalker Lost Alpha DC game, but now none of the options gives the correct picture, everything constantly fllickering and shows different parts of the game world at the same time from obscure angles, before that everything was fine and suddenly everything stopped working. Can this happen from the changes of new OS update or NVIDIA driver, is it possible to fix this error whithout reinstall Windows?

Anyone else have the same flickering error in STALKER Lost Alpha DC with RTGI?
The administrator has disabled public write access.

RT Guidebook - A ray traced Guide to Ray Tracing 4 weeks 2 days ago #19

It looks like this - imgur. com/a/GA1UFJi
The administrator has disabled public write access.

RT Guidebook - A ray traced Guide to Ray Tracing 4 weeks 2 days ago #20

According to moyevka, seems like you're having issue with wrong depth buffer.
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.
The administrator has disabled public write access.
  • Page:
  • 1
  • 2