Search Unity

Official New Post-processing Stack (Pre-Release)

Discussion in 'Image Effects' started by Chman, Oct 10, 2016.

  1. JohnSmith1915

    JohnSmith1915

    Joined:
    Apr 21, 2016
    Posts:
    143
    Wow, this works, thank you very much, would be nice if developers fix this in code and no flip images necesary anymore, for example put a checkbox with the option "flip vertical".
     
    Last edited: Apr 27, 2017
  2. JohnSmith1915

    JohnSmith1915

    Joined:
    Apr 21, 2016
    Posts:
    143
    Hi, I have a question about how works tonemapping correction, this effect converts sRGB colors to for example ACES film colors (Render RAW image -> sRGB -> ACES film colors -> GPU) or converts from raw linear color render data directly to ACES film colors (Render RAW image -> ACES film colors -> GPU) ?, if the first process is the used then is not a real ACES color encode and is a emulation effect? thanks.
     
    Last edited: Apr 29, 2017
  3. mitaywalle

    mitaywalle

    Joined:
    Jul 1, 2013
    Posts:
    252
    have same, rename Bloom.cginc (and refs to it in Bloom.shader & Uber.shader) helped
     
  4. Tibor0991

    Tibor0991

    Joined:
    Dec 11, 2016
    Posts:
    27
    This post-processing stack looks great, but so far it only works on non-VR games.
    How would I go to make it work on VR, especially on the Daydream?
     
  5. LunaTrap

    LunaTrap

    Joined:
    Apr 10, 2015
    Posts:
    120
    Why did you guys not included SMAA in this? TAA looks like everything is shaking, i dont know how this is better than no AA at all.

    Please add SMAA :(
     
  6. Deleted User

    Deleted User

    Guest

    Still wondering about this. It also occured to me that it would make sense for all Image Effect stack components to have access to these blur textures because DoF and SSR use them at least and if you have both enabled you would be wasting resources by generating blur textures once for each effect!
     
  7. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    You are incorrect, and probably have failed to set it up. Try a new project in 5.6 with the latest post fx download. Unless of course you think the adam demo is shaking non stop somehow.

    Or post a bug report. Unity has already said SMAA isn't going to happen.
     
  8. KUFgoddess

    KUFgoddess

    Joined:
    Apr 2, 2015
    Posts:
    27
    How do we access the post processing stack effects in C#? Like Using ? I am unable to use depth of field and effects like those now so I was wondering how can one use these in C#? I was looking around but was unsuccessful.
     
  9. KUFgoddess

    KUFgoddess

    Joined:
    Apr 2, 2015
    Posts:
    27
    Thank you so much I appreciate this.
     
  10. Nova-Shade

    Nova-Shade

    Joined:
    Oct 15, 2015
    Posts:
    136
    I guess this is only me but.. anyone else experienced the SSR not working anymore , despite being in deffered rendering and using a simple plane with a standard material set with high metalness/s ?
    What am I missing ?
     
    KUFgoddess likes this.
  11. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
  12. marggob

    marggob

    Joined:
    Feb 24, 2013
    Posts:
    65
  13. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    504
  14. xrooshka

    xrooshka

    Joined:
    Mar 5, 2014
    Posts:
    59
  15. nbac

    nbac

    Joined:
    Jul 7, 2015
    Posts:
    267
    anyone else experiencing some strange jittering from the postprocessing?
     
  16. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    Does it go away when you disable dithering?
     
  17. JRRReynolds

    JRRReynolds

    Joined:
    Oct 29, 2014
    Posts:
    192
    Does anyone get strange ghosting artifacts with TAA? If I keep the TAA cam still and pass a moving object in front of it, a trail of the object stays behind until I move the camera.
     
  18. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,913
    There's a lot of warping that happens. Check this video - https://gfycat.com/DismalFoolishDuckling
     
    KUFgoddess likes this.
  19. Mapasoft

    Mapasoft

    Joined:
    Oct 26, 2012
    Posts:
    2

    I have done this exactly (Assigning a new Profile to the current PostProcessingBehaviour), but doing so, I got spammed with this error :
    Attempting to release RenderTexture that were not gotten as a temp buffer

    What I did wrong ?
     
  20. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    Scene view image effect bug fixed in Patch 4
     
  21. bakanekofr

    bakanekofr

    Joined:
    Feb 28, 2014
    Posts:
    122
    I have an issue with the depth of field effect in this stack, using the latest GitHub version:

    The transparent elements such as the question mark particles on this shot seems to use depth information from the element behind it, and not the actual particle position.

    The question marks should not be blurry on this image as they're positioned at the left character's head, yet they appear blurry because the background behind them is far away.

    Is this the wanted behavior of the DOF effect? Is there a way to fix this / are you planning to fix it? Thanks!

     
  22. Adam-Bailey

    Adam-Bailey

    Joined:
    Feb 17, 2015
    Posts:
    232
    Using a transparent shader for the particles? Solution sees to be to switch to a different shader or use mesh particles since transparent objects don't write to the depth buffer.

    http://answers.unity3d.com/questions/1071430/depth-of-field-ignoring-particles.html
     
    bakanekofr likes this.
  23. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    It has entirely to do with the shader writing to depthbuffer or not. Meshes with transparent shaders will behave the same as particles with transparent shaders, because pretty much all transparent shaders don't write to the depth buffer. You could draw over the questionmark with another invisible shader that just writes to depth, after all transparent rendering is done. That might still look weird though, I'm not sure.
     
    Adam-Bailey and bakanekofr like this.
  24. bakanekofr

    bakanekofr

    Joined:
    Feb 28, 2014
    Posts:
    122
    I see. Yes, I was using a transparent shader. I've fixed the issue by using a cut-out shader. Thanks guys!
     
  25. nbac

    nbac

    Joined:
    Jul 7, 2015
    Posts:
    267
    the jittering is caused by the ambient occlusion as it seems
     
  26. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    Hm, for me the AO always worked fine, but I had some flickering issues with certain combinations of modules activated. That mostly went away with an update, except for dithering. Maybe try another version (an older one if you have the newest already).
     
  27. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    Black screen on GL Es 3.1 device T720 MP2 only used Color Grading
     
  28. JRRReynolds

    JRRReynolds

    Joined:
    Oct 29, 2014
    Posts:
    192
    yikes that is terrible, and pretty much exactly what is happening with mine too. Well I guess I'm glad I'm not alone, but not so glad that such a terrible issue still remains and makes TAA unusable aside from static scenes.
     
  29. Crystalline

    Crystalline

    Joined:
    Sep 11, 2013
    Posts:
    171
    I ve tried it on several projects and none will build when using this stack :(
     
  30. Ar7ific1al

    Ar7ific1al

    Joined:
    Jan 21, 2014
    Posts:
    54
    Generally speaking, just saying "it doesn't work" doesn't help anyone help you. You should provide as much information as possible, such as...
    Unity version
    Version of the asset
    Build target (PC, UWP, Windows Phone, iOS, Android, ...)



    As for me, I have just acquired an Xbox One and am really eager to begin testing games on it. But the post processing stack does not appear to be compatible with Universal Windows Platform (UWP). Unity version 5.6.0p1. Latest release version of this asset from the Asset Store. Error is as follows:
    Assets\PostProcessing\Runtime\Utils\ReflectionUtils.cs(81,29): error CS1061: 'Type' does not contain a definition for 'BaseType' and no extension method 'BaseType' accepting a first argument of type 'Type' could be found (are you missing a using directive or an assembly reference?)

    EDIT: The solution to my problem is easy. Simply move ReflectionUtils.cs from the Runtime/Utils/ folder to the Editor/Utils/ folder.
     
    Last edited: May 17, 2017
  31. FuzzyShan

    FuzzyShan

    Joined:
    Jul 30, 2012
    Posts:
    182
    how well does this fair on mobile platform?
     
  32. mephistonight

    mephistonight

    Joined:
    Dec 14, 2016
    Posts:
    75
    Unity 5.6 - EnlightenRunTimeManager.PostUpdate process using 95% CPU time when using post processing stack.

    Not sure if this is the right place for this but today I experienced the following:

    1) With the post processing stack enabled when pressing play in the editor, the Profiler shows a steady 60FPS.

    2) If I make a development build of the scene with it plugged in to the profiler, FPS drops to 15 FPS. It's continuous spikes caused by the EnlightenRuntimeManage.PostUpdate process. I don't understand what this is or why it only happens in a build, rather than in the editor / play as well.

    If I disable the post processing stack on my camera and rebuild, this spikes completely stop. Building without it plugged in to the profiler (dev build turned off) I can see the lag spikes, so it still happens then too.

    Anyone any ideas?
     
  33. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Are you testing on a desktop PC or laptop ? it's not hardware fault ?
     
  34. mephistonight

    mephistonight

    Joined:
    Dec 14, 2016
    Posts:
    75
    Hi,

    No, it's definitely not a hardware fault. It's a relatively new (less than a year old) desktop PC and testing on a separate machine produces the same results.

    The bit I don't understand is that I don't get the same results in the editor.

    I have nailed it down to the screen space reflection option. This seems to be the culprit. I get that these effects are expensive but is this expected behaviour? I.e difference between editor play mode and build?

    I also get this strange glitch with the bloom setting, so I'm wondering if there's something else going on in my scene that's effecting the post processing stack. See attached.
     

    Attached Files:

  35. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    SSR have an impact, if you turn it off perhaps you won't have spikes ?
    The game should run faster in build mode, you could check your build settings perhaps you have something not expected turned on or some value too hight somewhere.
     
  36. xrooshka

    xrooshka

    Joined:
    Mar 5, 2014
    Posts:
    59
  37. Dream5

    Dream5

    Joined:
    May 13, 2017
    Posts:
    4
    Hey, I'm kinda new but I read the Github instructions but bloom is missing/a few things have different names, has it been renamed?
     
  38. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    Since updating to Unity 5.6.1 (from the first 5.6 release) screen space reflection doesn't seem to work. When I turn it on the scene goes black as if there's no lighting. I've double-checked I'm still using deferred lighting and have rebuild the scene lighting. (The water uses its own reflection script, which is why it still works.)

     
  39. Adam-Bailey

    Adam-Bailey

    Joined:
    Feb 17, 2015
    Posts:
    232
    I might be missing something obvious, but your scene doesn't seem to have any lighting at all? What exactly are you hoping to reflect?
     
  40. ifurkend

    ifurkend

    Joined:
    Sep 4, 2012
    Posts:
    350
    In 5.6 scene with procedural skybox, when camera MSAA is enabled and direction light x-rotation is reduced to below certain angle, weird artifects shows up on the horizon.

    msaa_post_stack.png
     
  41. Coredumping

    Coredumping

    Joined:
    Dec 17, 2014
    Posts:
    51
    There seems to be a bug in 5.5.3p3 where the generated code for the screen space reflection shader is wrong when running GLCore.

    The code in the ScreenSpaceRaytrace.cginc file:
    Code (CSharp):
    1. if (P1.y > yMax || P1.y < 0.5)) {
    2.         float yClip = (P1.y > yMax) ? yMax : 0.5;
    3.         float yAlpha = (P1.y - yClip) / (P1.y - P0.y); // Denominator is not zero, since P0 != P1 (or P0 would have been clipped!)
    4.         alpha = yAlpha;
    5.     }
    Causes the compiler to generate code that tries to access non-existing 3rd and 4th values of a bool vector with 2 values.
    Changing it to the following seems to disable the optimization and remove the error:
    Code (CSharp):
    1. if (!(P1.y <= yMax && P1.y >= 0.5)) {
    2.         float yClip = (P1.y > yMax) ? yMax : 0.5;
    3.         float yAlpha = (P1.y - yClip) / (P1.y - P0.y); // Denominator is not zero, since P0 != P1 (or P0 would have been clipped!)
    4.         alpha = yAlpha;
    5.     }
     
    Marks98 likes this.
  42. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    It does have lighting. That image is how the scene looks when I try to use screen space reflections. Here's how it looks if I disable SSR:

     
    Last edited: May 21, 2017
  43. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    What's the status of the flickering issue on your end? I've pulled a new version of the stack from the assetstore yesterday and the issue still seems to persist. If you haven't found a fix internally that isn't live on the assetstore yet, I might have a repro case now.
     
  44. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    I can't find that code in ScreenSpaceRaytrace.cginc. The closest I have is:

    if (P1.y > yMax || P1.y < yMin) {
    float yClip = (P1.y > yMax) ? yMax : yMin;
    float yAlpha = (P1.y - yClip) / (P1.y - P0.y); // Denominator is not zero, since P0 != P1 (or P0 would have been clipped!)
    alpha = yAlpha;
    }
     
  45. Coredumping

    Coredumping

    Joined:
    Dec 17, 2014
    Posts:
    51
    I forgot, I inlined the constants in an attempt to avoid the bugged optimization, so that is the code I'm referring to.
     
  46. frankadimcosta

    frankadimcosta

    Joined:
    Jan 14, 2015
    Posts:
    203
    I have a problem with depth of field: the intensity of effect (blur) changes with different screen resolution. So i must change aperture.

    Settings are:
    Focus distance: 3
    Aperture: 6.5
    Use camera FOV: disabled
    Focal lenght: 50
    Kernel size: medium

    Unity 5.6.1p1

    TNX for support.
     
  47. JohnSmith1915

    JohnSmith1915

    Joined:
    Apr 21, 2016
    Posts:
    143
    What are the differences between V1 and V2 in Github?
     
  48. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    afaik v2 are total refactor of the PostProStack with some new feature, some feature are still cannot be used. Most are ready.
    But i don't recommend it to be used in the real production for now.
     
  49. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,913
    Will there be a simplified Depth of Field mode? I don't want to learn about cameras just to use it.

    Focus distance, focus size, near blur, far blur, etc should work for most games.
     
  50. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,790
    You don't need to.

    Play with the settings for 10 seconds and you'll get what each one does.
     
    Martin_H likes this.