-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Addons: Add TRAAPassNode
.
#29636
Addons: Add TRAAPassNode
.
#29636
Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
Hmm.. could you give me an example? |
I have refactored the MRT handling a bit so However, because of the intermediate sample render target that gets a jitter applied, the result isn't correct. We can't use the same approach like in
I've implemented this via 172c2ee but unfortunately, I get a |
This reverts commit 172c2ee.
Reverting the prepass approach for now. I have the feeling we need a different approach like configuring what MRT outputs should be affected jitter and which not. In this way, we would not need any updates to |
I'll go ahead and merge since adding full MRT support might take a while until we figure out a solution. In the meanwhile, |
Fixed #14050.
Related issue: #29295.
Description
This PR rewrites
TAARenderPass
asTRAAPassNode
forWebGPURenderer
.It is now a full TRAA approach meaning it uses reprojection based on a velocity pass.
TRAAPassNode
also implements color clamping based on neighborhood sampling as well as flicker reduction based on luminance weighing. The implementation could be further enhanced e.g. by variance clipping, subpixel sampling or post sharpening but for now it's a good start.There are some open issues:
WebGL is not supported yet since the pass needs the ability to copy between render targets. A few days ago @gkjohnson coincidentally filed the respective issue: WebGLRenderer: Allow for copying data between render targets using "copyTextureToTexture" #29612.TRAAPassNode
uses jitter to produce a frame with a slight offset which is used for accumulation. However, the jitter should only affect the beauty pass. Right now, the pass injects a non-modified projection matrix intoVelocityNode
to get accurate results. However, depth and any other additional MRT output should not receive jitter as well.To solve 2, one solution would be an unjittered pre-pass for velocity, depth, normals etc.. The beauty is then produced with a separate pass that incorporates the jitter. That means however only beauty will receive the AA, depth and normals not. I'm not sure how other engines handle this aspect but I think it would be one way to go.