Implement TSAA (Temporal Specular Anti-Aliasing) pipeline#74
Draft
Implement TSAA (Temporal Specular Anti-Aliasing) pipeline#74
Conversation
Add TSAAPass with ping-pong history buffers, Halton-based sub-pixel jitter, motion vector reprojection via inverse ViewProj, and variance-based neighborhood clamping (Karis 2014). Co-authored-by: bluesky013 <35895395+bluesky013@users.noreply.github.com>
… remove accidental log file Co-authored-by: bluesky013 <35895395+bluesky013@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement TSAA solution
Implement TSAA (Temporal Specular Anti-Aliasing) pipeline
Mar 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a full temporal anti-aliasing pass to the forward rendering pipeline: Forward → TSAA → PostProcessing → Present.
New files
TSAAPass.h/cpp—FullScreenPasssubclass managing two persistent RGBA16F images in ping-pong for history reprojection. Handles resolution changes by recreating buffers.tsaa.hlsl— Per-pixel motion vectors viainv(ViewProj)cofactor inverse, 3×3 dilated closest-depth lookup, Karis '14 variance-based neighborhood clamping in Reinhard-tonemapped space, velocity-adaptive blend (5–12%).tsaa.tech— Fullscreen technique definition (no depth, no cull).Pipeline integration (
DefaultForwardPipeline)SceneView::SetJitter(), and writes jitter UV toShaderPassInfo.TSAAPassbetween forward and post-processing.PostProcessingPassnow readsTSAAColorinstead ofForwardColor.Core changes
SceneView—SetJitter(float, float)offsetsprojects[i]columns 2,0/2,1 before computingviewProject. Jitter bakes into both current andlastViewProject, so motion vectors are correct without explicit unjitter.ShaderPassInfo— AppendedVector4 jitter(trailing field, no ABI break for existing shaders that only read up toViewport).PostProcessingPass— Constructor now takes optionalstd::string_view inputColorNamedefaulting toFWD_CLfor backward compatibility.DefaultPassConstants— AddedTSAA_CL,TSAA_HIST.Shader algorithm sketch
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.