playdeadgames / temporal Goto Github PK
View Code? Open in Web Editor NEWTemporal Reprojection Anti-Aliasing for Unity 5.0+
License: MIT License
Temporal Reprojection Anti-Aliasing for Unity 5.0+
License: MIT License
Currently this tool does not support dynamic resolution. I've hacked it in (see attached file), but this is (very) probably not correctly. Thought I'd share it anyways, perhaps someone can fix it properly!
While testing this component on my iPhone XR, the temporalAA looks nice on desktop, but when I run the demo scene on mobile, the output is jitter and not smooth at all. Which settings should I pay attention to in order to make this AA component work on mobile devices?
After applying the fix mentioned in #1(thanks!) it seems there is a bit of shimmering on the Example scene. I have attempted to create a gif to best show it:
To repro:
Apply the fix mentioned in #1.
Open the Example scene.
Apply a rotation animation to cube 13.
Observe that below the cube a strange shimmering displays (not the shadow but directly down from the image).
Hi,
I really like this TAA implementation, Unity's own is not on so pretty. Thank You so much for it, good work!
I dont't know if you guys have plans for supporting 2017.1 / 2 ? Right now, there are error messages when I try to use it on 2017.1, hope it helps:
Shader error in 'Playdead/Post/VelocityBuffer': failed to open source file: 'IncDepth.cginc' at line 18 (on d3d11)
Compiling Vertex program with CAMERA_PERSPECTIVE TILESIZE_20
Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_HARDWARE_TIER3
Shader error in 'Playdead/Post/TemporalReprojection': failed to open source file: 'IncDepth.cginc' at line 34 (on d3d11)
Compiling Vertex program with CAMERA_PERSPECTIVE MINMAX_3X3_ROUNDED UNJITTER_COLORSAMPLES USE_CLIPPING USE_DILATION USE_MOTION_BLUR USE_OPTIMIZATIONS
Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_HARDWARE_TIER3
Thank You again, keep up the good work !
Thanks for this fantastic AA solution!
I have tried to use this for orthographic cameras, but it appears to do nothing until I switch it to perspective. I may have missed something in the documentation, but I haven't seen anything that clearly specifies what camera types are supported.
Is this only limited to perspective cameras, or am I doing something wrong with orthographic?
Hi there ! Thanks for providing for free this very solid AA solution for Unity.
So far I'm satisfied of the result in our game (Subaeria) but I got one issue there. Because you are using a jittering script the camera is "shaking". I go have overlay UI in a separate camera that will follow 3d objects, the problem is that because of the jitter all my UI items are shaking. Because it's most of the time texts, it feels hard to read them.
If you have any advice for me to "erase" this side effect, it will be appreciated.
Thanks !
It's amazing that they added single pass VR support even though they didn't have to, but does anyone know how to mitigate the streaking which appears in VR?
I'm guessing this isn't on the table at all for the developers, but since they incredibly added single pass stereo support, I had to ask. :)
I get this error when I run the demo scene:
Trying to access pass 1, but material 'Playdead/Post/VelocityBuffer' subshader (0) has only 1 valid passes.
UnityEngine.Material:SetPass(Int32)
I've edited the shader files to account for glcore.
Unity 5.4.3f1 on OSX 10.11.3
Is this effect already using unity native motion vector or still using custom one?
Why not make this project available for free on Unity Asset Store?
This could potentially give more visibility to the temporal AA, so more testers and potential contributors to this open source project!
Hello, thanks for sharing this awesome library!
I'm trying to run the scene that was shared with this project on a empty Unity3d project and I get this error:
Trying to access pass 1, but material 'Playdead/Post/VelocityBuffer' subshader (0) has only 1 valid passes. UnityEngine.Material:SetPass(Int32) VelocityBuffer:OnPostRender() (at Assets/Scripts/VelocityBuffer.cs:126)
my unity3d version is 5.3.0f4 and I'm running on a MacOS.
There is a problem with motion gameObject when it has scale vector -1, -1, -1.
It seems that in such situation VelocityBufferTag doesn't work correctly (Mesh is blurred)
Does anyone know how to fix that issue?
Hello,
I don't know if this fantastic work is intended to survive new versions on Unity, but I've got some "ghosts" (really, it looks like ghosts) of objects that have velocity buffer tags, in other places in the scene.
I be glad to show you some screenshots if you need it.
Bye
I noticed that Inside is also running on the Nintendo Switch, and I think it is also using this TAA. However this repo doesn't seem to work on the Switch, could this perhaps be added?
On a side note, thanks so much for sharing this!
Hi,
EDIT: On file VelocityBuffer.shader
While trying to understand the algorithm, I noticed on line 10 the multi_compile statement and the following defines: TILESIZE_10, TILESIZE_20, TILESIZE_40.
But when they are used they are spelled differently (line 72 and onwards): TILE_SIZE_10, TILE_SIZE_20, TILE_SIZE_40. Note the underscores between 'TILE' and 'SIZE'.
Does that mean you always use a tile size of 1 on those shaders? Is that what shipped with the game?
** BEGIN EDIT **
I ask this because on file VelocityBuffer.cs, line 37, neighborMaxSupport is initialized like this:
public NeighborMaxSupport neighborMaxSupport = NeighborMaxSupport.TileSize20;
So apparently it was supposed to be TILESIZE_20 by default?
** END EDIT **
** EDIT ** Apparently this pass is not even being used because of 'neighborMaxGen' being 'false', so maybe this issue is not important
Best regards,
Daniel
I wonder if the temporal AA is calculated delay?
When camera move fast the Aliasing is very noticeable
Hi,
current version doesn't work properly with built-in VR camera.
One problem is, that native Unity VR uses one virtual camera and then modifies it on the fly just before rendering.
Because of that one history buffer is used for both eyes, which obviously can't work (it appears as horizontal blur on both images).
Another problem is, that I can't get real camera position, which is needed by this effects. I have tried making 2 cameras, setting each for left or right eye, but it doesn't help. (I think camera parameters read by the script are still incorrect).
Any suggestion how to fix it would b greatly appreciated! :)
Cheers,
Marcin
Hello people, if you ever read this - thank you.
It's amazing, its top notch and Unitytecs are unable to come even close with their current implementation, ill stick to this for as long as its possible, love you.
Motion Vector currently don't respond to camera FoV change. This is because in VelocityBuffer.cs, prevVP is not using previous projection matrix.
paramPrevVP[0] = currP * prevV;
paramPrevVP_NoFlip[0] = currP_NoFlip * prevV;
This simplified things for motion vector+camera jitter. Not sure how to improve this though.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.