This commit introduces a significant rework of the Temporal Anti-Aliasing (TAA) system, focusing on improving reconstruction quality, robustness, and introducing flexible upscaling. Core TAA Algorithm improvements: - Replaced the Catmull-Rom filter with a more efficient 5-tap Lanczos filter for history sampling, which includes deringing to reduce artifacts. - The input color buffer is now properly "unjittered" using a Lanczos reconstruction filter. - Improved the history rejection algorithm by skipping the expensive accurate clipping when the history sample is already within the neighborhood's color gamut. - Added a new `hdr` option to properly handle HDR content by tonemapping colors before blending and untonemapping the result. - Removed the ineffective `VARIANCE` only history rejection method. - Added protection against negative numbers in `sqrt()` for increased stability. TAA Upscaling: - Replaced the boolean `upscaling` flag with a float factor, allowing for variable upscaling ratios (e.g., 1.5x, 2x). - Upscaling now correctly adjusts viewport and projection settings. - The TAA shader now receives viewport and resolution information to correctly handle upscaled rendering. API and Configuration Changes: - Deprecated the `filterWidth` TAA option as it no longer has an effect. - Introduced the `upscaling` float property to `TemporalAntiAliasingOptions`. - Added the `hdr` boolean property to `TemporalAntiAliasingOptions`. Other Changes: - Updated UI elements in the viewer and material sandbox to reflect the new TAA options. - Updated Javascript bindings and TypeScript definitions for the new TAA settings. - Refactored shader code for clarity and performance.
48 KiB
48 KiB