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, |
Three.js TRAANode already applies Halton sequence jitter internally for temporal sampling. Our manual jitter was double-jittering, causing excessive blur especially on units. Removed: - Halton sequence generation code - Manual projection matrix jitter before render - Jitter reset after render TRAANode PR: mrdoob/three.js#29636
Fixed #14050.
Related issue: #29295.
Description
This PR rewrites
TAARenderPassasTRAAPassNodeforWebGPURenderer.It is now a full TRAA approach meaning it uses reprojection based on a velocity pass.
TRAAPassNodealso 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.TRAAPassNodeuses 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 intoVelocityNodeto 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.