Search Unity

PRISM - Realistic All-In-One Post-Processing for Unity

Discussion in 'Assets and Asset Store' started by GoGoGadget, Dec 12, 2015.

  1. Gametyme

    Gametyme

    Joined:
    May 7, 2014
    Posts:
    618
    When is 2.0 planned to be released? Getting a few warnings with unity 5.5.


    edit: saw dec up top.
     
  2. EvilGremlin

    EvilGremlin

    Joined:
    Aug 12, 2016
    Posts:
    231
    Does this work with Beautify?
     
  3. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Fairly sure this is a minor error with the tertiary shader in the current version (the error - not the game crash) - I've previously tested it on Android with SM3 compat.
    Try making sure this line is commented out:
    Code (CSharp):
    1. //#pragma exclude_renderers gles
    2.0 should handle this better. Also, apologies for delayed reply, back from leave now so full steam ahead with the final touches on 2.0!

    Yep, works well with Beautify.
     
    EvilGremlin likes this.
  4. yc960

    yc960

    Joined:
    Apr 30, 2015
    Posts:
    228
    I hope there will be a section on the doc with tutorial of adding in custom effect, like SSR, TAA into the pipeline to achieve the correct look for those effects.
     
    GoGoGadget likes this.
  5. Gerlich

    Gerlich

    Joined:
    Nov 3, 2015
    Posts:
    37
    Hey there,
    am about to get this asset, but I have some questions in advance.
    1. Is this running on a unity 5.1.5 Personal Edition, or is Pro needed?
    2. Does the Depth Of Field Shader work on iOS and Andriod mobile plattforms?

    Thank you for your answer!
    Regards Dan
     
  6. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Hi Dan,
    1. Works 100% on personal!
    2. It does work on newer mobiles with SM3.0+, but out of all the effects, it is the most complex, which generally means if possible you want to limit its use on mobile.
     
  7. Gerlich

    Gerlich

    Joined:
    Nov 3, 2015
    Posts:
    37
    Thank you for your quick response.
    So i gave the asset a try and got an really satisfying result. But as I pushed the gamescene to my Galaxy S4 testmobile phone, I only got a black screen...

    Could you explain to me, why that is and in the best case, how I can solve this?
    Thank you!
     
  8. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Glad to hear you're liking the look of it! That may be caused by PRISM's tertiary shader and glsl on the current version, I'll message you a preview version with the fix tomorrow so you can give that a try.

    Speaking of versions, 2.0 is coming soon, tonight it's passed all build tests on my PC, and is submitted to the Asset Store for approval! As always, 2.0 will be a free update for all current PRISM users. I don't know where to start on all the awesome new features it has, they've been in the works for months now and I'm really really happy with every one of them. The new sharpen + color enhance are probably my two picks of the bunch, I can't think of a time when I want to leave PRISM's new sharpen off now that I've used it, it's pretty amazing. No parameters except intensity, works 100% of the time, just makes stuff less blurry.

    Gotta include eye candy, so a still from the PRISM trailer - it's fun comparing this one to the PRISM 1.0 trailer in the same spot! shot1570On.jpg

    Also, here's a screenshot of PRISM's updated DoF in 2.0 running on android (Nexus 5x): - works like a charm! (I've actually been using PRISM + this crappy GUI to edit some photos for instagram, because why not :D)
    Screenshot_20161213-003421.png
     
    Last edited: Dec 12, 2016
    yc960, jmjd and Gametyme like this.
  9. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    580
    That's great!
    Any news about splitting the pipeline in two for transparent objects?
     
    GoGoGadget likes this.
  10. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Next on the roadmap! For now 2.0's focus is on making sure everything hits the ground running (and squashing of any bugs/issues that pop up, generally getting a rock-stable version) and then splitting transparents is next on the list. You can almost do it now by having a second (slightly modified) PRISM component on the inspector, but obviously that's ugly and not nice for CPU-side overheads.
     
    yc960 and mcmorry like this.
  11. david55527

    david55527

    Joined:
    Mar 24, 2013
    Posts:
    58
    I purchased this about a week ago, love it. Definitely looking forward to 2.0, sharpening is very much needed with TAA and Unity's sharpening isn't very good at all.

    Two small areas that I feel could use improvement:
    • AO. It looks fine, but I found that Unity's AO performed better (at least in my test scenes)
    • Godrays. They're good, but they seem to be a little too blended/blurred for my tastes. I wish I could tweak them so that they're a little more pronounced without over-brightening the sun. Any tips on settings or perhaps shader tweaks that could help achieve this?
    Otherwise, everything is great. Performance is fantastic.
     
    GoGoGadget likes this.
  12. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Thanks, glad you're liking PRISM so far! And yep, definitely worth looking forward to the sharpening in 2.0, it's pretty great.

    1. Regarding AO, there were quite a few changes made to it in 2.0, but it's basically Keijiro's (Unity's) AO with some added features (like lighting contribution, AO falloff). I know that when first profiling it was pretty much the same, but it's probably worth a revisit for 2.1.

    2. Very easy to do yourself actually! If you search in Prism.cginc for "fragSunBlur", there's a few variables you can change in there, to name them:
    Code (CSharp):
    1. const float _SunDecay=xx; //Amount the effect decreases as the rays move further away from the sun
    2. const float _SunExposure=xx; //Exposure
    3. const float _SunDensity=xx; //Extra space between samples when performing the blur      
    4. const int NUM_SUN_SAMPLES = xx;//Probably want to leave this the same, number of samples used to perform the blur
    These aren't included in the base effect because 90% of the time you won't need to tweak them - but I'll make sure to add this into the docs for those interested in doing so.
     
    david55527 likes this.
  13. Gametyme

    Gametyme

    Joined:
    May 7, 2014
    Posts:
    618
    Does 2.0 solve the tiled gpu warnings that started popping up in unity 5.5?
    These were taken from 5.6.

    Tiled GPU perf. warning: RenderTexture color surface (1226x690) was not cleared/discarded, doing <run with profiler for info>
    UnityEngine.Graphics:Blit(Texture, RenderTexture, Material, Int32)
    PrismEffects:OnRenderImage(RenderTexture, RenderTexture) (at Assets/PRISM/PrismEffects.cs:1809)

    Tiled GPU perf. warning: RenderTexture color surface (613x345) was not cleared/discarded, doing <run with profiler for info>
    UnityEngine.Graphics:Blit(Texture, RenderTexture, Material, Int32)
    PrismEffects:BlurTex(RenderTexture, Int32) (at Assets/PRISM/PrismEffects.cs:1560)
    PrismEffects:OnRenderImage(RenderTexture, RenderTexture) (at Assets/PRISM/PrismEffects.cs:1819)

    Tiled GPU perf. warning: RenderTexture color surface (306x172) was not cleared/discarded, doing <run with profiler for info>
    UnityEngine.Graphics:Blit(Texture, RenderTexture, Material, Int32)
    PrismEffects:BlurTex(RenderTexture, Int32) (at Assets/PRISM/PrismEffects.cs:1560)
    PrismEffects:OnRenderImage(RenderTexture, RenderTexture) (at Assets/PRISM/PrismEffects.cs:1820)

    Tiled GPU perf. warning: RenderTexture color surface (153x86) was not cleared/discarded, doing <run with profiler for info>
    UnityEngine.Graphics:Blit(Texture, RenderTexture, Material, Int32)
    PrismEffects:BlurTex(RenderTexture, Int32) (at Assets/PRISM/PrismEffects.cs:1560)
    PrismEffects:OnRenderImage(RenderTexture, RenderTexture) (at Assets/PRISM/PrismEffects.cs:1821)
     
  14. david55527

    david55527

    Joined:
    Mar 24, 2013
    Posts:
    58
    Thanks! That was what I was looking for.
     
  15. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    Could someone offer a performance comparison with the new Unity Post Stack? If this perform significantly better on mobiles then this asset is a no-brainer purchase.
     
  16. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    580
    I'm still waiting for the approval of version 2 on the store, so I don't know if you already changed this, but, in case not:
    is there a specific reason why to don't expose all the possible values?
    Some are visible only in debug mode, some only by code.
    This slows down a lot the workflow and is a no go for artists (that are not able / don't want to touch code or hidden values).
    Also in debug mode the name of many fields are different from the PRISM editor, leading to more confusion.
    If it is for simplicity of use, could you consider placing those additional settings in an advanced panel that can be collapsed?
     
  17. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Generally speaking, it is for ease of use. Always happy to expose more values, but the reason they aren't in the first place is to make it so that anyone can pick up PRISM and get something going nice and quickly.
    Definitely agree on the artists point though, so in the next version of PRISM I will expose those added values in an advanced section of the inspector. Speaking of the Godrays inspector, I've been experimenting with allowing HDR colors for the rays color and ray threshold, and early signs are good - this change won't be in 2.0, but should be in the next version.

    Will have to do some mobile perf. comparisons with hard stats! On desktop I just did a very quick editor test I'm getting about 0.5ms faster perf (~0.9@1080p vs ~1.4) for all the effects that have an equivalent (layered bloom, DoF with min samples, LUT, vignette, Chrom. Ab) - but these numbers may not reflect mobile performance, of course. Sometime in the next week I'll try to do a profile on my Nexus 5x - I'm assuming the Unity GPU profiler works somehow on mobile, but if it doesn't, if anyone has any good ways to profile the GPU on mobile, let me know, I'm still a bit new to mobile dev!

    Ah, guessing that's while using HDR bloom? I have done a successful mobile build on 5.5 but haven't seen those warnings - if they're still around in 2.0, I'll send you a fixed version, it's a pretty simple fix. Edit: PMed you
     
    Last edited: Dec 18, 2016
    mcmorry likes this.
  18. Gametyme

    Gametyme

    Joined:
    May 7, 2014
    Posts:
    618
    Still get this one with HDR bloom.

    Tiled GPU perf. warning: RenderTexture color surface (1744x981) was not cleared/discarded, doing <run with profiler for info>
     
  19. yc960

    yc960

    Joined:
    Apr 30, 2015
    Posts:
    228
  20. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    yc960 likes this.
  21. yc960

    yc960

    Joined:
    Apr 30, 2015
    Posts:
    228
    Is anamorphic flare on the roadmap?

    Also, I want to insert effects into PRISM so it has the correct look even if there is no performance gain, could you add a guide to do this?

    I would also want to use temperal sampling to increase the image quality and integrate TAA and Moblur, can that be done, I already seen someone use temp sampling to increase AO quality.
     
  22. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    1. Looking for some feedback on the 2.0 lens flares to see how they go first, anamorphic may come later, a few versions into 2.x
    2. I'll add a section to the notes giving a general idea - but that's quite an advanced topic and varies greatly from one effect to the other - there's no easy way to 'insert' image effects into an uber-effect like PRISM (or Unity's PostPro.).
    3. Absolutely, there's no reason PRISM doesn't work with Unity's TAA. The Moblur question is more for Unity (or whomever's TAA you are using, as it's always 100% separate from other effects)

    Happy to finally announce that PRISM 2.0 is now live on the Asset Store! Get your hands on the new color enhance, new sharpen, faster bloom amongst a bunch of other big upgrades. Check out the 2.0 trailer while you're at it, featuring some awesome games made with PRISM!
     
    Shodan0101 and mcmorry like this.
  23. yc960

    yc960

    Joined:
    Apr 30, 2015
    Posts:
    228
    bug for 2.0, near blur option now blur the whole screen, near blur radius and focus range now has no effect. 5.5.0p1 fresh project, fresh import.

    Getting error "
    maximum ps_4_0 sampler register index (16) exceeded
    Compiling Fragment program with PRISM_USE_EXPOSURE PRISM_HDR_BLOOM PRISM_USE_STABLEBLOOM PRISM_LINEAR_LOOKUP PRISM_USE_DOF PRISM_ACES_TONEMAP PRISM_USE_FLARES
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING SHADER_API_DESKTOP"

    I am also getting severe bloom flare blinking. This was not present in 1.8.6. Could you expose stablility buffer setting for me to adjust?
     
    Last edited: Dec 20, 2016
  24. david55527

    david55527

    Joined:
    Mar 24, 2013
    Posts:
    58
    The new sharpening is PERFECT with TAA. Also, just started using a very small amount of filmic noise for a dithering effect - gets rid of color banding in night skies nicely!

    I'm loving PRISM more and more each day :)
     
    GoGoGadget likes this.
  25. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,085
    Awesome seeing The Deep Paths in your trailer :)

    Looking forward to updating it to PRISM 2.0!
     
    GoGoGadget likes this.
  26. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    1. DoF issue is now fixed for 2.0.1, thanks for the report.
    2. Regarding the sampler error, I did encounter that earlier but removed a few and thought it was gone, just to confirm - what effects are you using (including lens dirt/other sub-effects)? Maybe even PM me a screenshot of your PRISM inspector, if possible.
    3. Next update should fix that, as well as add in an option as to what size your main bloom texture should be which can also impact it.

    Looking forward to seeing what everyone creates with 2.0!
     
    yc960 likes this.
  27. yc960

    yc960

    Joined:
    Apr 30, 2015
    Posts:
    228
    regarding that error, it pops up occasionally, I cannot always reproduce it. All i know is that if I hit play and start turnning on and off effects, it will sometimes pop up.
     
    GoGoGadget likes this.
  28. yc960

    yc960

    Joined:
    Apr 30, 2015
    Posts:
    228
    regrading the new lens flares, I need more lens color textures, or at least a guide on how to produce them, the current one is a bit too "colorful" for my scenes.
     
    GoGoGadget likes this.
  29. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Will make sure to add in a guide in the docs on how to produce them for next version, and see if some more examples can be included. Thanks for the feedback!
     
  30. yc960

    yc960

    Joined:
    Apr 30, 2015
    Posts:
    228
    show bloom texture option seems to be broken, it behaves differently than blur screen with bloom tex

    Also: with 5.6 going into beta and supports vulcan, do you see PRISM getting significant performance boost from using vulcan?
     
    Last edited: Dec 22, 2016
  31. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    That first one is intended, it only happens in HDR mode, PRISM blurs the screen with only 1 bloom texture - "Show Bloom Texture" in HDR mode actually shows a compilation of all the 4 layers of bloom, only 1 is needed to perform a full-screen blur.

    Vulkan has very little to do with individual pixel shaders performance, but if Unity gets a boost, then PRISM will as a follow-on effect.
     
  32. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    As an update, 2.0.1 has been submitted to the asset store for approval, fixing up a few small bugs that popped up in 2.0. Also, I'm away for the Christmas/New Year break until the first week of Jan next year, so support responses during that time may be a bit slower than normal.
     
    mcmorry likes this.
  33. Abnormalia_

    Abnormalia_

    Joined:
    Jul 23, 2013
    Posts:
    128
    How does it work in VR ? How performance compared to Unity ST Assets? Unity AO+Bloom+Slylistic Fog+Tonemap Combo Vs PRISM will I see GPU load gain? Thanks in advance.
     
  34. pauldrummond

    pauldrummond

    Joined:
    Oct 30, 2014
    Posts:
    145
    Is it possible to auto-focus on objects in the same way that Scion does?
     
  35. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    1. Currently, I don't have any VR platform to test on, so although 2.0 'should' work in VR, there's no way to guarantee it, and support for VR is (obviously) fairly difficult without a devkit. If you want to pick it up to try it in VR, feel free, if you encounter any issues I'd be happy to refund it, or help you out and try to resolve them (again, once I'm back on my dev PC in Jan)
    2. Yep, in all of my benchmarks I've seen a perf. gain (and on any device where there isn't, I'd like to look at and see why/improve it). Don't have access to all my benchmarks while I'm on my laptop, but here's the last one I did with bloom: https://forum.unity3d.com/threads/p...ocessing-for-unity.373429/page-7#post-2832205

    Yep! As per the PRISM Guide, just call SetDoFTransform() (or drag in a transform in the debug inspector) and PRISM's DoF will use that transform as a focal point. Focal distance is still up to you.
     
  36. A_Savvidis

    A_Savvidis

    Joined:
    Jul 21, 2016
    Posts:
    98
    Just got it (my first asset store purchase!) mostly for the God rays and the efficiency

    It's really good! I will use it in the project I am building right now

    Some notes :
    1. Demands an API updater
    2. Does not work well when placed on camera rig (Fog and DoF, all others work)
    bottom half of the screen is not affected
    3. Seems to work fine on VR (at least the preview window)
    4. God rays are a bit "flickery" when walking around looking from window frame
    5. Also rays are gone if you rotate your view more than 90 degrees from the Ray Caster

    Sorry if these notes are already noted or have to do with my fault, don't have time to check it out more but I am super excited about it and wanted to comment on this amazing eye-toy I just got!
     
    GoGoGadget likes this.
  37. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Great to hear, thanks for the feedback! So,
    1. I think that should be fixed in 2.0.1 (pending approval on the Asset Store) - if not, will be fixed in the next version
    2. Do you mean a VR camera rig?
    3. Noted, thanks
    4. In 2.0.1 the option for half-res godrays (instead of quarter-res) is available as an advanced option to solve this
    5. The behaviour should be similar to Unity's inbuilt godrays - it's a screen-space algorithm for these ones (not volumetric), so without the caster on screen the rays should fade out nicely.

    I'll have to have a play around with the new VR editor myself to see if I can spot any issues with anything, assuming it mirrors the actual behaviour of VR hardware.
     
  38. A_Savvidis

    A_Savvidis

    Joined:
    Jul 21, 2016
    Posts:
    98
    Testing done with Unity 5.5f3 + Google VR SDK 1.0.3 (Latest GVR SDK does not work well)

    3. Hmmm I think it's the Google SDK VR Integration that messes PRISM. Bloom seems to work fine, DoF flips the image(?!) bloom and DoF has two images integrated, one good (the bloom buffer image I guess) and the other flipped.

    Should I compress the project and send it somewhere for you to take a look?

    EDIT :
    I also got these in VR : "
    Tiled GPU perf. warning: RenderTexture color surface (251x129) was not cleared/discarded, doing <run with profiler for info>
    UnityEngine.Graphics:Blit(Texture, RenderTexture, Material, Int32)
    PrismEffects:OnRenderImage(RenderTexture, RenderTexture) (at Assets/PRISM/PrismEffects.cs:2531)"
     
    Last edited: Dec 28, 2016
  39. A_Savvidis

    A_Savvidis

    Joined:
    Jul 21, 2016
    Posts:
    98
    New tests showed me it's more complicated than that.
    I think it's Unity that's buggy take a look at the screen shot
    I have a normal floor (the white one) that goes farther that the room it self
    and you can see the corner of the floor on the red arrow I painted
    why? Because the room is Unlit-Texture, I changed the shader into standard and all was well
    The upper part is bad, it's like it does not take into account the distance of the fog or something.

    PS. I don't want to flood this thread with such posts, can we talk somewhere else?
    PS-2 : I understand I push some limits with Unity here,

    PRISM IS A TOTALLY RECOMMENDED MUST HAVE !!!
     

    Attached Files:

    GoGoGadget likes this.
  40. yc960

    yc960

    Joined:
    Apr 30, 2015
    Posts:
    228
    just got the 2.0.1 patch, near blur remains broken.
     
    GoGoGadget likes this.
  41. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Thanks for the feedback! Definitely would like to solve those issues with GVR if possible, if you'd like to send me a PM, it's usually easier than flooding the thread - my PMs are always open.

    Just had a look - it does work with "Use MRTs" checked (recommended for all platforms except mobile), but there's an issue with the front CoC pass when not using MRTs, will get that fixed in the next update.

    Yep (MRTs = MultipleRenderTargets) - very strange, I just tested it out myself on a new import and near blur does seem to be working (using the newest Asset Store version - http://imgur.com/a/z6YtN). Just found a bug with the smoothness of the near blur fade distance, but apart from that it does seem to be working.
     
    Last edited: Dec 29, 2016
  42. yc960

    yc960

    Joined:
    Apr 30, 2015
    Posts:
    228
    I assume MRT means multiple render targets, if that is the case, it is still not working empty project fresh import 5.5.0p3.
     
    GoGoGadget likes this.
  43. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Because 2.0 doesn't work with the Wii U anymore, I'm using 1.8 still. With 1.8 I'm seeing an issue where anything transparent is drawn behind fog that is added when you check the Apply to Skybox checkbox. Is there some fix for this?
     
    GoGoGadget likes this.
  44. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    The behaviour of transparents shouldn't have changed between any of the 1.x versions - what may have happened is you've previously added the [ImageEffectOpaque] tag (as per the docs) to OnRenderImage() in PrismEffects.cs, and forgot to re-add it? Feel free to message me and we can sort that out.

    Regarding 2.0 on WiiU, I'm pretty keen to iron out any issues and get it working, have recently been smashing out the last few remaining mobile bugs for 2.0 (it's running like a dream on mobile btw, managed to get bloom/sharpen/AO/color enhance/vignette at 30fps on my Nexus5x), so can now focus on any other platforms where issues popped up.
     
  45. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I don't know if I ever did that or not. I'll check the docs and see if I can sort it out.

    [EDIT]
    That seems to have fixed it. Thanks.
     
    Last edited: Dec 30, 2016
  46. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    @GoGoGadget
    Hi,

    I have rendering issues using DOF using default values with Unity 5.4.1.f1

     
  47. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    A fix has now been submitted to the store for this issue, along with a few other improvements & changes, notably to mobile performance with some of the newer effects. Should be on the asset store soon!
     
    zenGarden likes this.
  48. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Quick little poll for everyone in the thread, I'd like to get everyone's opinions on what areas you think PRISM's documentation is lacking in - pretty keen to do a documentation boost with a future update, maybe even a tutorial video if there's anything specific people would like to see!

    Also, you can now access PRISM's documentation by typing prism.tips into your browser :D Give it a try!
     
    yc960 and Shodan0101 like this.
  49. yc960

    yc960

    Joined:
    Apr 30, 2015
    Posts:
    228
    Only thing I view as critical is an in-depth guide to integrate other effects into the PRISM stack for the correct order of look. I do not mind it getting a bit technical, but it is the only obstacle that I encounter with PRISM (besides bugs).
     
    Squize and GoGoGadget like this.
  50. Gametyme

    Gametyme

    Joined:
    May 7, 2014
    Posts:
    618
    Some info on the performance hit of brightness.
     
    GoGoGadget likes this.