0beqz / screen-space-reflections

Implements Screen Space Reflections in three.js
https://screen-space-reflections.vercel.app/
MIT License
550 stars 44 forks source link

Separate out Temporal Reproduction into separate general post effect? #11

Open bhouston opened 2 years ago

bhouston commented 2 years ago

I noticed this has a TRAA like step in it. I wonder if it should just be separated out into its own general purpose anti-aliasing method that can be used with or without SSR? I sort of view TRAA/TAA as a general purpose algorithm. Please note I put a bounty on a general purpose implementation of TRAA in #threejs, here: https://github.com/mrdoob/three.js/issues/14050

0beqz commented 2 years ago

Hmm, well so I could definitely separate the steps to set up TR. So for example I could create a separate directory "temporal-resolve" where all the steps such as generating the velocity buffer and copying the composed output texture to a frame buffer target for use in the next frame could take place. This would then be independant of the SSR algorithm. The composition algorithm (to create a final frame from the accumulated samples texture and the current samples texture) is quite dependant on SSR though, so I'd have to write a more fitting composition shader for TRAA.

But yeah, I plan to write a TRAA shader soon that will use the TR steps from this SSR effect.

hybridherbst commented 1 year ago

Any news on this? 🙂 Thanks!