Skip to content

Commit 67ec986

Browse files
authored
Merge pull request #51 from Pjbomb2/Dev
Dev
2 parents 6b244c8 + 20aecdc commit 67ec986

20 files changed

+1037
-99
lines changed

README.md

Lines changed: 60 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,20 @@ for bringing bindless textures to unity!
111111
<li>If you use HDRIs, or CubeMaps for the skybox, you need to format as the texture to a Texture2D in the inspector of the image, unity will convert it automatically, then put it in the slot in "Scene Settings" in the TrueTrace settings menu</li>
112112
</ul>
113113

114+
## URP Setup
115+
<ul>
116+
<li>If using Unity 6000 or above, you need to go to Project Settings -> Graphics -> (at the bottom)Turn on Compatability Mode</li>
117+
<li>In the Universal Renderer Asset being used turn on "Native RenderPass"</li>
118+
<li>EITHER:</li>
119+
<ul>
120+
<li>In the camera, turn on PostProcessing, and turn the Anti-Aliasing to TAA(This is the only way I have found to reliably force motion vector generation in URP for some reason...)</li>
121+
<li>OR</li>
122+
<li>In Truetrace Settings -> Functionality Settings -> Turn ON "Use Custom Motion Vectors"</li>
123+
</ul>
124+
<li>Finally, add the "URPTTInjectPass" script to an empty gameobject if it has not been automatically added</li>
125+
<li>Reccomended - Go to the Universal Render Pipeline Asset you are using, and turn the render scale to 1</li>
126+
</ul>
127+
114128
## Creating Non-Standard Images
115129
<ul>
116130
<li>Attatch the "TTAdvancedImageGen" script to any gameobject in the hierarchy, and fill out the settings you want.</li>
@@ -200,21 +214,57 @@ TrueTrace Options Description -
200214
<li>Enable FXAA - Enables FXAA</li>
201215
</ul>
202216

203-
204-
## URP Setup
217+
## Advanced Options
218+
GlobalDefines.cginc Description -
205219
<ul>
206-
<li>If using Unity 6000 or above, you need to go to Project Settings -> Graphics -> (at the bottom)Turn on Compatability Mode</li>
207-
<li>In the Universal Renderer Asset being used turn on "Native RenderPass"</li>
208-
<li>EITHER:</li>
220+
<li>NOTE: THIS IS REFERING TO THE FILE "GlobalDefines.cginc" WHICH INCLUDES EXTRA FUNCTIONALITY</li>
221+
<li>To access: TrueTrace-Unity-Pathtracer -> TrueTrace -> Resources -> GlobalDefines.cginc(the blue one)</li>
222+
<li>Options(Toggle them by removing/adding "//" in front of each #define:</li>
223+
<li>DONT MODIFY DIRECTLY:</li>
209224
<ul>
210-
<li>In the camera, turn on PostProcessing, and turn the Anti-Aliasing to TAA(This is the only way I have found to reliably force motion vector generation in URP for some reason...)</li>
211-
<li>OR</li>
212-
<li>In Truetrace Settings -> Functionality Settings -> Turn ON "Use Custom Motion Vectors"</li>
225+
<li>HardwareRT - This is handled from the CPU side under Functionality Settings</li>
226+
<li>HDRP - This is handled from the CPU side automatically</li>
227+
<li>DX11 - This is handled from the CPU side automatically/Under Functionality Settings</li>
228+
<li>UseBindless - This is handled from the CPU side automatically/Under Functionality Settings</li>
229+
<li>UseSGTree - This is handled from the CPU side under Functionality Settings</li>
230+
<li>TTCustomMotionVectors - This is handled from the CPU side under Functionality Settings; named "Remove Rasterization Requirement"</li>
231+
<li>MultiMapScreenshot - This is handled from the CPU side under Functionality Settings; named "Save Multiple Maps On Screenshot"; Truetrace will also save images of material ID and mesh ID maps when using TTAdvancedImageGen or the Screenshot button</li>
232+
</ul>
233+
<li>These are fine to modify yourself:</li>
234+
<ul>
235+
<li>AdvancedAlphaMapped - Allows for cutout objects to be evaluated during traversal, saving performance for cutout objects but can degrade performance otherwise; best left ON</li>
236+
<li>ExtraSampleValidation - Allows ReSTIR to shoot 2 shadow rays, one for direct, one for indirect; is a lot more expensive(in SWRT) but can be worth it</li>
237+
<li>ReSTIRAdvancedValidation - Uses a special small trick to make more use of ReSTIR shadow rays in later frames</li>
238+
<li>IgnoreGlassShadow - Allows NEE rays to pass through glass</li>
239+
<li>IgnoreGlassMain - Turning this on basically removes glass from the scene</li>
240+
<li>FadeMapping - Allows the use of FadeMapping in the Material Options, not stable in denoising(also accessable from Functionality Settings)</li>
241+
<li>PointFiltering - Samples textures with a point filter, instead of linear or trilinear</li>
242+
<li>StainedGlassShadow - Paired with "IgnoreGlassShadow", allows colored glass to color these shadow rays that pass through them(also accessable from Functionality Settings)</li>
243+
<li>IgnoreBackfacing - Rays will not intersect triangle facing away from the ray(also accessable from Functionality Settings)</li>
244+
<li>LBVH - Whether or not to use RIS for triangle sampling or one of the light trees(also accessable from Functionality Settings)</li>
245+
<li>AccurateEmissionTex - Whether or not to sample emission textues</li>
246+
<li>TrueBlack - Legacy option, allows for actual black, which used to cause issues but no longer does</li>
247+
<li>UseTextureLOD - When bindless is on, this allows for dumb sampling of texture LOD's(also accessable from Functionality Settings)</li>
248+
<li>EONDiffuse - Whether to use Lambert diffuse model or EON diffuse model(also accessable from Functionality Settings)</li>
249+
<li>AdvancedBackground - Allows selected surfaces to instead be treated as hitting the skybox(also accessable from Functionality Settings)</li>
250+
<li>UseBRDFLights - Whether to use MIS when using NEE or not; Turning off CAN help massively with fireflies</li>
251+
<li>DoubleBufferSGTree - Allows ASVGF to better sample moving emissive meshes, but is a lot more expensive with asvgf on</li>
252+
<li>Fog - Toggles multiscatter fog, not denoiser compatable(also accessable from Functionality Settings)</li>
253+
<li>RadCache - Quick toggle for the Radiance Cache(also accessable from Functionality Settings)</li>
254+
<li>ClampRoughnessToBounce - Clamps the material roughness to be higher for each bounce, helps fight fireflies</li>
255+
<li>RasterizedDirect - Experimental, BIRP only, will make truetrace only contribnute to indirect, and use unity rasterization for direct</li>
256+
<li>ReSTIRSampleReduction - Experiemental, only pathtraces half the rays and lets ReSTIR fill in the gaps</li>
257+
<li>ReSTIRRestrictSpatial - Experiemental option to allow for cleaner reflections in near-mirrors</li>
258+
<li>SmartRestriction - Additional cleanup ontop of previous define</li>
259+
<li>ReSTIRAdditionalAO - Adds fake AO through restir, can help with brightened corners</li>
260+
<li>ShadowGlassAttenuation - Advancement of "StainedGlassShadow"; still experimental</li>
261+
<li>DisableNormalMaps - Debug thing</li>
262+
<li>ClayMetalOverride - Allows for clay mode to also define a constant metallic/roughness</li>
213263
</ul>
214-
<li>Finally, add the "URPTTInjectPass" script to an empty gameobject if it has not been automatically added</li>
215-
<li>Reccomended - Go to the Universal Render Pipeline Asset you are using, and turn the render scale to 1</li>
216264
</ul>
217265

266+
267+
218268
# Known Bugs:
219269
</br>
220270
<ul>

TrueTrace.unitypackage

19.2 KB
Binary file not shown.

TrueTrace/DemoScene.asset

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ MonoBehaviour:
1616
IndirectBoost: 1
1717
bouncecount: 12
1818
ClayMode: 0
19-
UseRussianRoulette: 1
19+
UseRussianRoulette: 0
2020
UseNEE: 1
2121
DoTLASUpdates: 1
22-
Accumulate: 1
22+
Accumulate: 0
2323
PPBloom: 0
2424
BloomStrength: 0.5
2525
PPDoF: 0
@@ -28,11 +28,11 @@ MonoBehaviour:
2828
DoFFocal: 5.2216897
2929
PPExposure: 0
3030
ExposureAuto: 0
31-
PPToneMap: 1
31+
PPToneMap: 0
3232
PPTAA: 0
3333
RenderScale: 1
3434
DenoiserMethod: 0
35-
UpscalerMethod: 0
35+
UpscalerMethod: 2
3636
UseReSTIRGITemporal: 1
3737
UseReSTIRGISpatial: 1
3838
UseReSTIRGI: 0
@@ -49,6 +49,9 @@ MonoBehaviour:
4949
ToneMapper: 0
5050
SkyDesaturate: 0
5151
ClayColor: {x: 0.5, y: 0.5, z: 0.5}
52+
ClayMetalOverride: 1
53+
ClayRoughnessOverride: 0.3
54+
DoClayMetalRoughOverride: 0
5255
GroundColor: {x: 0.11320752, y: 0.11320752, z: 0.11320752}
5356
FireflyFrameCount: 0
5457
FireflyFrameInterval: 1
@@ -74,7 +77,7 @@ MonoBehaviour:
7477
PPFXAA: 0
7578
OIDNBlendRatio: 1
7679
ConvBloom: 1
77-
ConvStrength: 7.03
80+
ConvStrength: 0.04
7881
ConvBloomThreshold: 0
7982
ConvBloomSize: {x: 1, y: 1}
8083
ConvBloomDistExp: 0

TrueTrace/DemoScene.unity

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15114,9 +15114,9 @@ MonoBehaviour:
1511415114
ArrayIndex: 0
1511515115
IESIndex: 0
1511615116
ShadowSoftness: 0
15117-
UseKelvin: 0
15117+
UseKelvin: 1
1511815118
IsMainSun: 1
15119-
KelvinTemperature: 1000
15119+
KelvinTemperature: 7734
1512015120
Intensity: 122
1512115121
Col: {x: 1, y: 1, z: 1}
1512215122
SpotAngle: 30
@@ -60543,7 +60543,7 @@ MonoBehaviour:
6054360543
Roughness: 0
6054460544
MatType: 0
6054560545
TransmittanceColor: {x: 1, y: 1, z: 1}
60546-
IOR: 1.43
60546+
IOR: 1.31
6054760547
Metallic: 0
6054860548
Sheen: 0
6054960549
SheenTint: 0
@@ -65698,7 +65698,7 @@ Camera:
6569865698
m_CullingMask:
6569965699
serializedVersion: 2
6570065700
m_Bits: 4294967295
65701-
m_RenderingPath: 1
65701+
m_RenderingPath: 3
6570265702
m_TargetTexture: {fileID: 0}
6570365703
m_TargetDisplay: 0
6570465704
m_TargetEye: 3

0 commit comments

Comments
 (0)