Skip to content

Releases: Pjbomb2/TrueTrace-Unity-Pathtracer

Massive improvements to ASVGF

04 Jun 18:22
Compare
Choose a tag to compare

Revamped both ASVGF and ASVGF + ReSTIR
ASVGF + ReSTIR now has clean reflections/refractions
Removed a lot of redudant textures/kernels from ReSTIRASVGF
ASVGF indirect shadowing has been massively improved
ASVGF will smear at edges of screen instead of darkening, its much less noticeable
Small modification to radcache buffers so I still fit under 8 RW resources for DX11 compatability

BIG fix to radacache that caused fireflies

Added Triangle Splitting option for SWRT, under "Functionality Settings", improves tracing performance(Thanks to BoyBayKiller)

Added a toggle to invert alpha texture on a material
moved "Remove TrueTrace from Scene" to the bottom of its window
Added plugs for emissioncolor and emissionintensity in material pairer
Added texture slot for difftrans

"ClampRoughnessToBounce" define in GlobalDefines.cginc will now also influence clearcoat, resulting in less fireflies
Clicking "Quick Paste" on a material without holding shift will not also load the textures, while holding shift while clicking will
Fixed interaction between primary sky + glass + radcache generated GI
Added ability to turn on/off camera in TTAdvancedImageGen
Added extra verbose mode, for also outputting data about how long each step of building/preprocessing takes for each object
Modified how thin difftrans is handled
Fixed restir GI for thin difftrans
"Force Static" will no longer force skinned meshes into the static
Updated/added some new images
Small modifications to MoreAO
Small improvement to stability when building mesh
Small change to make updating from much older truetrace easier material-wise

Added new define in GlobalDefines.cginc: "MoreAO", for... more AO
Removed define in GlobalDefines.cginc: "ReSTIRAdditionalAO", as "MoreAO" is a better solution and doesnt depend on ReSTIR
Added new define in GlobalDefines.cginc for restir to prevent blurring across materials
Added new define in GlobalDefines.cginc for ignore backfacing but only for emissives
Added new define in GlobalDefines.cginc for an alternate method of handling fade mapped materials that is stable in denoiser

v2.5.81

27 Apr 18:46
67ec986
Compare
Choose a tag to compare

Fixed ASVGF Indirect becoming low res when next to metallic
Fixed HDRP for unity 2021 and 2022
Fixed sliders visuals resetting in raytracinglights and truetraces settings
BVHRefitter now uses the Rodriguez rotation
Added thing for screenshots to also take images of matID and meshID(yanus request)
Added metallic/roughness overrides if you turn on clay mode
Added rasterized direct lighting option(BIRP only)
Some more fixes to unity lights in HDRP not using the same naming convention in unity for areasize
Adjusted step for transfering between primary and secondary sky off a rough metallic surface to roughness = 0.5

v.2.5.8

21 Apr 22:44
Compare
Choose a tag to compare

Fixes:
Fixed scenes without any light meshes
Fixed material rotations not matching
Fixed materials becoming desynced
Fixed ReSTIR blurring mirrors
Fixed some warnings
Fix to bsdf MIS weights in light sampling
Fix to light BVH when a triangles radiance = 0
Fixed issue with skinned meshes with improper bounds
Fixed fade mapping for SWRT
Fixed long standing bugs in radcache
Fixed panoramas not saving to panorama path
Fixed ASVGF, TAA, and several other shaders breaking if you recompile something during play
Fixed terrain not instantiating trees with correct scales
Fixed AGXMHC and AGXBC tonemappers

UI stuff:
Removed ReSTIR GI update rate
Added ability to multi-edit multiple raytracinglights at once
Added a per-raytracingobject toggle that allows you to temporarily force all local materials to be invisible
Widened fog sliders
Added AGX Medium High Contrast Tonemapepr
Increased size of raytracinglights sliders
Simplified material pairing by dictating whether a texture is single channel based on its usage
Added tooltips to most options under "Functionality Settings"
Added Khronos PBR Neutral tonemapper
Removed VMF diffuse
Added anisotropy rotation

Misc:
Rasterization/deferred is no longer required at all(So you can turn it off and save performance in large scenes), if you turn on "Remove Rasterization Requirement", as truetrace can now generate its own motion vectors/depth buffer
Updated OIDN to be compatable with blackwell GPU's(NVIDIA 50 series)
Revamped ReSTIR GI again, now to more correct asymmetrical pairwise MIS weights, much higher quality
Improved terrain quality
Massively improved terrain trace speed
Reduced frequent allocations coming from background TLAS rebuilds
Performance bump to trace speeds, especially on 4080+
Reduced memory consumption/GC allocation for BVH8, BVH2, and LightBVH
Reduced memory use/properly free the memory used by "Emissive Texture Aware Light BVH"
Restir textures will no longer be allocated if restir is off, saving VRAM
Added several new options to "GlobalDefines.cginc"
Removed several options from "GlobalDefines.cginc"
Optimized BVH2 building performance by ~15%
Optimized BVH8 building performance by ~20%
Optimized Light BVH building performance by ~47%

CPU performance improvements
New triangle buffers are no longer re-allocated if the existing buffer is long enough(saves a lot of performance when adding/removing objects, can be turned off under "Functionality Settings" -> Enable Strict Memory Reduction

Minor optimization to light trees
Small update to restir ASVGF so its not garbage
Added left/right flags to light BVH nodes so it can more accurately traverse the TLAS
Changes to how I handle thin difftrans objects
Small improvement to chromatic aberation
Did some cleanup on kernels, so BVH refitting is now faster
When there is no directional light marked "IsSun", truetrace will now take the first directional light
Changed up Internal material structure
Small performance optimization to ASVGF
Matcaps now default to on if there is no mask
Improved resolution of radcache
"MatChangeResetsAccum" now defaults to ON
Sky is now added to radcache
Non-atlas stuff will no longer be allocated/run if using bindless
Improved unity light CPU overhead
Added debug flags/options in GlobalDefines.cginc for geometric and normal mapped normals

Improved restir shadows for spotlights and arealights
Improved behavior of ShadowSoftness for area lights
Massively improved area light sampling

v.2.5.7

16 Feb 01:30
d40aa11
Compare
Choose a tag to compare

Increased max tri count before instancing to 41,297,762

Added orthographic camera support
Re-Added DX11(and thus vulkan and metal) support
Added small UI for raytracinglights
Added ability to have multiple directional lights, but specify which one should control the sky
Added ability to suppress caustics via forcing min roughness based on curbounce
Added more texture-specific scales/offsets

Fixed ASVGF reprojection and stability, so its WAYYYY higher quality now
Fixed instance rasterization at > 511 instances
Small performance improvement to SWRT traversal through persistent threads
Small modification to restir to be temporally stable under camera motion
Light BVH now properly rebuilds every X frames

Added Multiscatter Heightfog

24 Jan 17:16
090db38
Compare
Choose a tag to compare

UI:
Added ability to selectively instance specific meshes
Added a button to let you create instances from certain meshes instead of all meshes
Added the ability to stop truetrace from spitting so much to the console
Replaced Panorama, Large screenshot, timedscreenshotter, and turntable scripts with "TTAdvancedImageGen" script
Added button to ttsettings objects so that you can modify them in-play
Changed slider for texture rotation to [0,360]
Moved postprocessing settings back to main tab
Rearranged hierarchy options
Fixed typo in Contrast
Each camera can now have its own entire set of settings

Fixes:
Mostly fixed VRAM memory leak when switching scenes during play/build
Fixed DoF middle mouse setting
Fixed the middle mouse button surface selection with hardware RT
Fixed issue with pasting material presets
Fixed massive fireflies from radcache
Fixed secondary albedo texture multiply mode not being correct
Fixed HWRT instances if one of the instances sources is not a target of any instanceobjects
Fixed some material alignment issues with hardware RT instances
undoing instancing with prefab in project from source prefab now works
Fixed OIDN buffer release
Properly disposing the remaining atmosphere textures now
Fixed the initialization of roughness vs smoothness
Fixed light BVH tlas with weird scales
Fixed light BVH with zero area triangles
Fixed errors on parenobjects when no assetmanager
Fixed global settings mode of TTSettings getting reset
TrueTraces settings menu should now work even without active TT scripts in the scene

Misc:
Improved ReSTIR spatial performance significantly
Small modification to ArrayInstancer to make instancing over an object easier
Added chromatic aberation, vignette, and saturation/contrast from shadertoy
Updated the OIDN plugin to new version
Improved quality of sgtree, and possibly speed slightly
Improved partial glass adding extra energy with radcache
Minor material modifications
Small cleanup of the shadingshader code
Small modification to oidn to help with moirre patterns
Got rid of svgf(NOT ASVGF) shader...(why was that back again?)
Removed Ding noise

v.2.5.5

27 Dec 00:38
e5ffe50
Compare
Choose a tag to compare

Large CPU Optimizations!
Switched the light BVH TLAS builder over to using async
Optimized light BVH builder by about 20%
Optimized mesh loading by about 50%
Instanced objects can now be moved around independantly without huge lag if you have tens of thousands of them
Same goes for emissive instanced

Large RAM Optimizations!
Reduced Maximum Ram Use during BVH building by about 25%
Reduced reserved RAM use significantly
Improved overall build times for SWRT(for 17 million triangles, went from 1:50 to 1:43)

Added back colored thin glass
Added hash buffer compaction for the radcache
Added small script for instancing arrays
Added OPTIX support(thanks to UnityDev)

Fixed HWRT instances index
Fixed AO/visible radcache
Fixed OIDN in unity 6000
Fixed white lines in corners with restir
Fixed gaussian tree being incorrectly weighted for differently parented objects
Fixed OIDN at frame limiter = 0
Fixed issue with panorama + ReSTIR
Fixed the scaled intensity for the BUILDER of the lightbvh
Fixed terrain
Fixed unity crashing in the even that there is no emissive meshes in the scene
Fixed handling of skinned meshes vertex buffers occasionally going out of date

Increased max submesh * mesh count for HWRT instances from 65k to 134 million
Small modification to radcache to allow for nicer subsurface scattering
More tuning to radcache
Changed naming scheme for screenshots and panoramas
Panoramas will now go back to the previous resolution when its done
Very minor optimizations to radcache

Optimized ReSTIR spatial by about 50% while maintaining similar quality by switching to 2 spatial passes
Minor general ReSTIR optimizations

v.2.5.4

15 Dec 23:50
51a48f6
Compare
Choose a tag to compare

ENTIRELY Rewrote Radiance Cache
ENTIRELY Rewrote ReSTIR GI
Meshes no longer need to be read/writeable to be loaded in play mode, however the method used to load these meshes consumes a lot more RAM
URP is now functionally viable

Added texture fallback system, so you can plug in multiple textures to one material slot, and itll use the first one that exists
Added toggle for the double buffered SG Tree
Added prototype thing for truetrace to pull from the original shaders texture scale/offset
Added debug view for depth
Added simple non-realtime multiscatter fog
Added support for Instancing using Hardware RT(Requires unity 6000.1.0a4f
Added basic imposter prototype to the instances
Added prototype version of direct scene rendering for HDRP and URP
Added a thing that will hopefully prevent the globaldefines file breaking itself on new TT import
Added small script thatll allow you to render truetrace to rendertexture
Added small script for taking screenshots every X seconds("TTTimeScreenShotter")
Added maximum sample count before going idle
Added better handling of camera resizing/screen resolution changing, courtesy of UnityDev
Added an experiemental high performance mode, turn on PartialRenderingFactor to 2

Scroll wheel can now be used to change the DoF aperature size

Changed direct sky illumination to add to indirect so it is handled much better by ASVGF(low frequency signal)
Increased terrain stability through a better binary search
AlbedoBlendFactor material now defaults to 0, not 1
Updating RayTracingLights now resets accumulation

Small fix for SGTree refitting
Fixed BVH refitter
Fixed annoyance with the preset system where it would lag
Fixed small bug with hardware RT shadows not getting glass color when terrain exists in the scene
Fixed bug with unity URP breaking my postprocessing
Fixed upscaling bug with sky for HDRP and URP
Fixed upscaling bug with HDRP for its depth buffer with ASVGF
Fixed materials on instances getting screwy with more than 1 source
Fixed issue with materials not being loaded properly in HDRP
Fixed ASVGF in HDRP with custom render scales being wrong
Small fix to gaussian tree for naive light sampling
Small modification to secondary world position reconstruction for more precision
Small fix to RIS sampling for unity lights when there are area lights present
Fixed an issue with HDRP where resizing the screen would skew the image
Fixed an issue with hdrp where toggling off/on the custom pass component would break some of the buffers
Fixed ASVGF depth sampling in HDRP
Fixed DX11 Only Mode

Updated readme with sources for vMF diffuse and EON diffuse models
Updated the README with the URP instructions
URP injector now gets automatically added

Freed up about 400mb of VRAM at 1080p from removing buffers
Massively reduced per-frame GC allocations
Starting to move over to Adjoint matrices
Most minor of optimizations to CWBVH traversal(nothing noticeable)

v.2.5.3

09 Nov 00:41
60b083b
Compare
Choose a tag to compare

Added Gaussian Light Tree to be used instead of the standard Light BVH from PBRT 4
Added toggle to toggle between the Gaussian Tree and the Light BVH(Gaussian Tree performs worse but has better quality, especially on non-mirror metallic surfaces)
Added EON diffuse model
Added support for Vertex Colors
Added an SDF slicer(mostly for Yanus). Access it at TrueTrace -> Resources -> Utility -> TTSDFs
Added basic bilinear upscaling option
Added primary background tint, tint strength, and primary background contrast for background/ray miss
Moved to compressed UV's for triangles
Re-added "Is Background" material flag
Added per-material toggle for Vertex Colors
NEE can now contribute(minorly) to rougher glass
Small modification to how refraction/absorption is handled
Added double-buffering for Gaussian Tree/Light BVH so that moving objects that contain emissive triangles dont screw with ASVGF(may impact performance, let me know if it does...)
Gave the same memory optimization(basically converting everything to nativearrays and pointers) treatment I do for the standard BVH's to the Light BVH
Added secondary/detail normal map with its own scale, offset, strength, and blending material parameters

UI:
Added ability to toggle some of the GlobalDefines directly from the CPU(go to TrueTrace settings -> Functionality Settings), so you dont have to modify the code file directly for most things
Small UI modifications, added most of the limiters to value fields
Added automatic disabling of toggles that should NOT be modified during play mode
Added basic folder system to material presets
Upscaling foldout disappears when resolution ratio is 1

Bug fixes:
Fixed turntable image saving
Fixed high resolution screenshots using panoramadoer(it doesnt only do panoramas...)
Fixed bug where materials wouldnt save properly
Fixed bug where loading presets would only load material parameters of the dropdowns that were open
Fixed occasionally exploding glass
Fixed spotlights with shadow softness != 0 being sampled badly
Fixed pointlights, spotlights, and area lights having different intensities than their mesh counterparts(aka, area light of same area and intensity as an emissive quad will now look the exact same in output. Pointlights and spotlights now look the exact same as an emissive sphere)
Fixed instances breaking with unity terrain

Small update

28 Sep 18:01
7f70d43
Compare
Choose a tag to compare

Added different blending methods for secondary/primary albedo
Added WIP convolutional/FFT bloom
Added AlbedoBlendFactor
Secondary Albedo no longer needs mask to work, falls back on "AlbedoBlendFactor"
Changed thin glass from "sqrt(Color)" to "sqrt(Color / PI) * PI" to account for the color correction
Renamed "Denoiser.cs" to "TTPostProcessing.cs" finally
Changed path names for panoramas and turntables
Added WIP convolutional/FFT bloom
Added AlbedoBlendFactor
Secondary Albedo no longer needs mask to work, falls back on "AlbedoBlendFactor"
Changed thin glass from "sqrt(Color)" to "sqrt(Color / PI) * PI" to account for the color correction
Renamed "Denoiser.cs" to "TTPostProcessing.cs" finally
Changed path names for panoramas and turntables
Tiny changes to the tracer to hopefully perform better
Also works in Vulkan

Quality of life overhauls - Hotfix 2

12 Sep 23:10
Compare
Choose a tag to compare

Materials:
Re-added texture rotation support for bindless textures
Added kelvin option for coloring RayTracingObjects, this applies also to emissive raytracingobjects
Glass marked thin is now colored based off of scatterdist and surfacecolor
Removed "Range" property from MaterialMappings, as considering them all floats seems to work fine
Sky behind glass should now refract properly in ASVGF
Added "Color Bleed" slider to reduce the amount that bounced light gets affected by the surfaces color
Materials with a pdf of less than or equal to 0 are marked as invalid paths
Fixed IgnoreBackfacing toggle with hardware RT
Fixed IgnoreBackfacing for emissive triangle sampling
Added experiemental fade mode, needs to be turned on in GlobalDefines
StainedGlassShadows is now affected by BlendFactor, and ScatterDist
Individual submeshes can now be glass with Hardware RT
Added Stained Glass support for Hardware RT
Updated DiffTrans to actually respect distance traveled

ASVGF:
Improved performance slightly
Added more passes to the indirect pass for cleaner denoised results
Significantly improved reflections
Fixed artifacts coming from semi-metallic surfaces
Adding metallic stopping weights to blur

Performance:
Moved initialization for globalcolors and radcache from RayGen to ShadingShader
Improved ASVGF performance by removing jitter, instead I replaced the old offset step size factor(Old: [0,1,2,3,4,5]; New: [0,5,4,3,2,1]) (THANKS SNURF!)
Massively optimized the playmodesaving of materials when you change many materials(didnt realize how grossly slow the origional system was)
Slightly optimized mesh refitting accumulation step

UI(or User Experience):
Completely redid the RayTracingObject material parameter view
Added lines to some of the raytracingobject material parameters when you hover over them to show what other parameters can be combined with it(Turn off in truetrace settings -> Functionality Settings -> "show material helper lines")
Added outline to hovered over material parameters(Turn off in truetrace settings -> Functionality Settings -> "show material helper lines")
Added toggle to turn off sky transmittance affecting sun color in Functionality Settings
Added button to autofocus, left ctrl + middle mouse button in the play screen will autofocus DoF to the mouse
Changing DoF focus will reset accumulation
Added button to quick-select materials, middle mouse button by itself in the play screen will pull up whatever material/surface the mouse is over
Removed sun desaturation slider
DX11 will be forced on if DX12 is missing, and will force off the other toggles that rely on DX12
Removed TextureScrollChanged button
Added toggle to TrueTrace Settings -> Functionality Settings; When on, changing any materials parameters will reset accumulation

Misc:
New shortcut entries for Screenshot and BVH Building, assign them in Edit -> Shortcuts in unity, they are named "TrueTraceScreenshot " and "TrueTraceBuildBVH"
Added FXAA
Fixed copied scenes not creating their own new TTSettings file
Added system ontop of the object que system to hopefully handle edgecases better(realized I havent tested this as thoroughly as I would like, so let me know of any errors!)
Fixed terrain albedo with bindless
Improved OIDN denoiser to respect TrueTrace texture tilings
Fixed long standing misspelling of "Emission", and changed all variables named "Emmissive" to "Emission"
Modified how the RadCache reacts to glass
Fixed auto start for dx11
Fixed ReSTIR breaking when dx12 doesnt exist at all
Default camera fly script will no longer point straight up on start in HDRP 2023+
Added new Debug Views in "GlobalDefines.cginc" - Material ID, Mesh ID, Triangle ID, Albedo, BVH view, Radiance Cache, GI lighting
Removed "Hierarchy Modifiers" and "MasterMaterialEditor" scripts
Improved normal maps by more accurately deducing the input maps format
Improved the sky
Fixed sharpen postprocess breaking when changing resolutions
Fixed dx11 bug
Replaced "Rotation Animation" and "Translation Animation" files with a single file

Hotfix:
Fixed upscaling not working correctly
Hotfix 2:
Fixed turntable script breaking builds
Fixed ASVGF not working in DX11
Fixed DoF focusing
Added jitter/AA to panorama rendering