Skip to content

Commit bab025b

Browse files
authored
Merge pull request #49 from Pjbomb2/Dev
Dev
2 parents d40aa11 + 0c62911 commit bab025b

File tree

65 files changed

+43524
-2146377
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+43524
-2146377
lines changed

README.md

Lines changed: 35 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
<li>Convolution Bloom(Not mine)</li>
4242
<li>Vulkan and Metal support(Your mileage may vary)</li>
4343
<li>Mesh slicing using SDFs(Does not modify meshes, for rendering cuts only, like cross-sections)</li>
44-
<li>EON and vMF diffuse models</li>
45-
<li>Chromatic Aberation, Contrast/Saturation, Colored Vignette</li>
44+
<li>Lambert or EON diffuse models</li>
45+
<li>Chromatic Aberation, Saturation, Colored Vignette</li>
4646
<li>Full Multiscatter Fog(Not realtime)</li>
4747
<li>Orthographic Camera</li>
4848
</ul>
@@ -106,7 +106,7 @@ for bringing bindless textures to unity!
106106
<li>The green/red rectangle shows when the acceleration structure is done building, and thus ready to render, red means that its not done, and green means its done building, a ding will sound when it completes if it takes longer than 15 seconds(Turn on Truetrace Settings -> Functionality Settings</li>
107107
<li>Objects can be added and removed at will simply by toggling the associated GameObject with a ParentObject script on/off in the hierarchy(clicking on parent objects with complex objects for children will lag), but they will take time to appear as the acceleration structure needs to be rebuilt for them</li>
108108
<li>Emissive meshes need to be have a non-zero emissive value when they are built or rebuilt to work with NEE, but after that can have their emissiveness changed at will</li>
109-
<li>To set up PBR with the DEFAULT material, all textures go into their proper names, but Roughness goes into the Occlusion texture(This can be changed in the MaterialPairing menu)</li>
109+
<li>To set up PBR with the DEFAULT BIRP material, all textures go into their proper names, but Roughness goes into the Occlusion texture(This can be changed in the MaterialPairing menu)</li>
110110
<li>If you are using blendshapes to change geometry of a skinned mesh, you may need to go to the import settings of it(in the inspector), turn off Legacy Blendshape Normals, and make sure all normals are imported, not calculated, otherwise the normals for blendshapes might be wrong</li>
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>
@@ -125,22 +125,28 @@ for bringing bindless textures to unity!
125125

126126
## Linking Shader Textures to TrueTrace
127127
<ul>
128+
<li>You only need to do this once per SHADER, not once per material. Unconfigured shaders will just appear white in truetrace</li>
128129
<li>In the PathTracingSettings, click the tab called "Material Pair Options"</li>
129130
<li>Drag any material that has the shader you want to pair into the material slot that appears</li>
130-
<li>From here, you will see 4 buttons, click those to add the input type and connect it to the output tab. Do this with the default material for an example</li>
131+
<li>From here, you will see 3 buttons, click those to add the input type and connect it to the output tab. Do this with the any material using the default shader for an example</li>
131132
<li>Once this is done, click "Apply Material Links" and rebuild the BVH in the "Main Options" tab to update the objects in the scene</li>
132133
</ul>
133134

134135
## Functionality Settings Contents
135136
<ul>
137+
<li>NOTE FIRST: MOST OF THESE IN THIS TABLE NOW HAVE TOOLTIPS THAT APPEAR IF YOU HOVER OVER THEM!</li>
136138
<li>Enable RT Cores - (DX12 Only, REQUIRES UNITY 2023 OR HIGHER)Enables Hardware RT for cards that support it.</li>
137-
<li>Disable Bindless Textures - DX12 Only, Disables bindless texturing, and uses the atlas fallback(Limits resolution).</li>
139+
<li>Disable Bindless Textures - DX11(/vulkan/metal) compatability, Disables bindless texturing, and uses the atlas fallback(Limits resolution).</li>
138140
<li>Use Old Light BVH Instead of Gaussian Tree - Disables the Gaussian Tree for higher performance but worse light sampling on metallics.</li>
139-
<li>Use DX11 - Disables DX12 only toggles, but allows truetrace to run in DX11.</li>
141+
<li>Use DX11 - Disables DX12 only toggles, but allows truetrace to run in DX11(/vulkan/metal).</li>
140142
<li>Enable OIDN - (DX12 Only) Adds the OIDN denoiser to the Denoiser list in "Main Options"</li>
141143
<li>FULLY Disable Radiance Cache - Will free the memory usually used by the Radiance Cache</li>
144+
<li>Remove Rasterization Requirement - Truetrace stops using rasterization for anything(other than upscaling with TAAU), so you can turn off rasterization rendering in your cameras for extra performance</li>
142145
<li>Enable Emissive Texture Aware Light BVH - Allows for smarter/better sampling of emissive meshes by considering their emissive masks/textures; Can use lots of RAM.</li>
143-
<li>Use Light BVH - Toggles the use of EITHER the Light BVH or Gaussian Tree on/off; uses the RIS count of NEE if off. Turn off for maximum speed.</li>
146+
<li>Enable Verbose Logging - Truetrace will yell more information into the console.</li>
147+
<li>Fade Mapping - Not super compatable with realtime denoisers, but allows for surfaces with variable transparency, based on alpha texture.</li>
148+
<li>Stained Glass - Whether or not to color shadow rays that pass through colored glass, dictated by material parameters: Thin, Albedo, Scatter Distance.</li>
149+
<li>Use Light BVH - Toggles the use of EITHER the Light BVH or Gaussian Tree on/off; uses the RIS count of NEE if off. Turn off for maximum speed, but poor emissive mesh sampling quality.</li>
144150
<li>Quick Radcache Toggle - Toggles the radcache on/off. Useful for comparing to ground truth pathtracing.</li>
145151
</ul>
146152

@@ -164,25 +170,13 @@ TrueTrace Options Description -
164170
</ul>
165171
<li>Allow Mesh Skinning - Turns on the ability for skinned meshes to be animated or deformed with respect to their armeture</li>
166172
<li>Denoiser - Allows you to switch between different denoisers</li>
167-
<li>Allow Bloom - Turns on or off Bloom</li>
168-
<li>Sharpness Filter - Contrast Adaptive Sharpening</li>
169-
<li>Enable DoF - Turns on or off Depth of Field, and its associated settings</li>
170-
<ul>
171-
<li>CTRL + Middle Mouse - Autofocuses to whatever object your mouse is hovering over in the game view</li>
172-
<li>CTRL + Middle Mouse Scroll - Adjusts the Aperature Size</li>
173-
</ul>
174-
<li>Enable Auto/Manual Exposure - Turns on or off Exposure adjustment</li>
175173
<li>Use ReSTIR GI - Enables ReSTIR GI which is usually much higher quality(Works with Recur and SVGF denoisers)</li>
176174
<ul>
177175
<li>Do Sample Connection Validation - Confirms that two samples are mutually visable and throws it away if they are not</li>
178-
<li>Update Rate - How many pixels per frame get re-traced to ensure they are still valid paths(7 or 33 is a good number to aim for here at 1080p)</li>]
179-
<li>Enable Temporal - Enables the Temporal pass of ReSTIR GI(allows samples to travel across time</li>
176+
<li>Enable Temporal - Enables the Temporal pass of ReSTIR GI(allows samples to travel across time, current useless)</li>
180177
<li>Temporal M Cap - How long a sample may live for, lower means lighting updates faster(until 0 which is the opposite) but more noise(recommended either 0 or around 12, but can be played with)</li>
181178
<li>Enable Spatial - Enables the Spatial pass of ReSTIR GI(Allows pixels to choose to use the neighboring pixels sample instead)</li>
182179
</ul>
183-
<li>Enable TAA - Enables Temporal Antialiasing</li>
184-
<li>Enable FXAA - Enables FXAA</li>
185-
<li>Enable Tonemapping - Turns on tonemapping, and allows you to select a specific tonemapper</li>
186180
<li>Upscaler(ONLY when "Interal Resolution Ratio" is NOT 1) - Allows selection from one of a few upscaling methods</li>
187181
<li>Use Partial Rendering - Traces only 1 out of (X*X) rays, improving performance</li>
188182
<li>Enable AntiFirefly - Enables RCRS filter for getting rid of those single bright pixels</li>
@@ -191,17 +185,34 @@ TrueTrace Options Description -
191185
<li>Anti-Firefly Frame Interval - Anti-Firefly will run once every X frames, this is X</li>
192186
</ul>
193187
<li>RR Ignores Primary Hit - Allows for an extra bounce basically, makes it so that dark objects arent noisier, but at the cost of performance</li>
194-
<li>Atmospheric Scatter Samples - Lower this to 1 if you keep crashing on entering play mode(controls how many atmospheric samples are precomputed)</li>
188+
<li>Atmospheric Scatter Samples - controls how many multiscatter atmospheric samples are precomputed</li>
195189
<li>Current Samples - Shows how many samples have currently been accumulated</li>
190+
<li>Enable Tonemapping - Turns on tonemapping, and allows you to select a specific tonemapper</li>
191+
<li>Use Sharpness Filter - Contrast Adaptive Sharpening</li>
192+
<li>Enable Bloom - Turns on or off Bloom</li>
193+
<li>Enable DoF - Turns on or off Depth of Field, and its associated settings</li>
194+
<ul>
195+
<li>CTRL + Middle Mouse - Autofocuses to whatever object your mouse is hovering over in the game view</li>
196+
<li>CTRL + Middle Mouse Scroll - Adjusts the Aperature Size</li>
197+
</ul>
198+
<li>Enable Auto/Manual Exposure - Turns on or off Exposure adjustment</li>
199+
<li>Enable TAA - Enables Temporal Antialiasing</li>
200+
<li>Enable FXAA - Enables FXAA</li>
196201
</ul>
197202

198203

199204
## URP Setup
200205
<ul>
201-
<li>In the Universal Renderer Asset being used, change the Rendering Path to Deferred, and turn on "Native RenderPass"</li>
202206
<li>If using Unity 6000 or above, you need to go to Project Settings -> Graphics -> (at the bottom)Turn on Compatability Mode</li>
203-
<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>
204-
<li>Finally, add the "URPTTInjectPass" script to an empty gameobject</li>
207+
<li>In the Universal Renderer Asset being used turn on "Native RenderPass"</li>
208+
<li>EITHER:</li>
209+
<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>
213+
</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>
205216
</ul>
206217

207218
# Known Bugs:
@@ -227,12 +238,10 @@ TrueTrace Options Description -
227238
<li>Github Sponsors:</li>
228239
<ul>
229240
<li>Jhin: $5</li>
230-
<li>Kevin: $5</li>
231241
<li>Omid: $2</li>
232242
</ul>
233243
<li>Kofi:</li>
234244
<ul>
235-
<li>JiRo: $20</li>
236245
</ul>
237246
</ul>
238247
</ul>

TrueTrace.unitypackage

-3.34 MB
Binary file not shown.

TrueTrace/DemoScene.asset

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,29 +19,28 @@ MonoBehaviour:
1919
UseRussianRoulette: 1
2020
UseNEE: 1
2121
DoTLASUpdates: 1
22-
Accumulate: 0
22+
Accumulate: 1
2323
PPBloom: 0
2424
BloomStrength: 0.5
2525
PPDoF: 0
2626
DoFAperature: 0.2
2727
DoFAperatureScale: 1
2828
DoFFocal: 5.2216897
2929
PPExposure: 0
30-
ExposureAuto: 1
31-
PPToneMap: 0
30+
ExposureAuto: 0
31+
PPToneMap: 1
3232
PPTAA: 0
3333
RenderScale: 1
34-
DenoiserMethod: 1
35-
UpscalerMethod: 2
34+
DenoiserMethod: 0
35+
UpscalerMethod: 0
3636
UseReSTIRGITemporal: 1
3737
UseReSTIRGISpatial: 1
3838
UseReSTIRGI: 0
3939
ReSTIRGISpatialCount: 24
4040
ReSTIRGISpatialRadius: 50
41-
ReSTIRGITemporalMCap: 20
42-
ReSTIRGIUpdateRate: 0
41+
ReSTIRGITemporalMCap: 12
4342
DoReSTIRGIConnectionValidation: 1
44-
Exposure: 41.7
43+
Exposure: 5.4
4544
DoPartialRendering: 0
4645
PartialRenderingFactor: 1
4746
DoFirefly: 0
@@ -75,7 +74,7 @@ MonoBehaviour:
7574
PPFXAA: 0
7675
OIDNBlendRatio: 1
7776
ConvBloom: 1
78-
ConvStrength: 0.3
77+
ConvStrength: 7.03
7978
ConvBloomThreshold: 0
8079
ConvBloomSize: {x: 1, y: 1}
8180
ConvBloomDistExp: 0
@@ -84,14 +83,14 @@ MonoBehaviour:
8483
PrimaryBackgroundTintColor: {x: 1, y: 1, z: 1}
8584
PrimaryBackgroundTint: 0
8685
PrimaryBackgroundContrast: 1
87-
FogDensity: 0.2
86+
FogDensity: 0.008
8887
FogHeight: 80
8988
FogColor: {x: 1, y: 1, z: 1}
90-
MaxSampCount: 99999999
89+
MaxSampCount: 9999999
9190
DoChromaAber: 0
9291
ChromaDistort: 0.14
9392
DoBCS: 0
94-
Saturation: 1
93+
Saturation: 1.96
9594
Contrast: 1
9695
DoVignette: 0
9796
innerVignette: 0.5

0 commit comments

Comments
 (0)