Search Unity

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

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

  1. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    That is a different style of flare (anamorphic flares) that isn't currently a feature in PRISM. One issue right now is because PRISM has so many features, I'm actually at the sampler cap for DX9/11/etc of 16, so it's not an easy task to add that in while still having every other effect on. I'm happy to work on it if people don't mind that (should only affect people who already use every effect).
     
  2. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    672
    I have Prism and the Vive. We're testing different effect packages to see what runs well in VR. When I use Prism with the beautify preset, with features on or off, it renders the scene twice incorrectly. With sharpen on it seemed to do it 3 times and of course its all messed up. I'm running in single pass mode, Linear Color Space and Forward rendering mode.
     
  3. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Hey Tethys,

    Thanks for the bug report! Will look into that one for you - haven't heard a report of sharpen being broken in VR, but I know a few VR users are on older versions of PRISM. As a note, I'm still currently limited to EditorVR which also presents some issues - what Editor version are you using?
     
    Last edited: Apr 6, 2017
  4. Tethys

    Tethys

    Joined:
    Jul 2, 2012
    Posts:
    672
    I'm on Unity 5.5.1. If you need screenshots let me know. I can also possibly try some more settings today when I get back to the office - I initially tried turning everything off and still had the double image issue.
     
    GoGoGadget likes this.
  5. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Actually, some screenshots would be great! Just moved house so was out of action for a bit there, that'd be helpful.
     
  6. Flurgle

    Flurgle

    Joined:
    May 16, 2016
    Posts:
    389
    Some great fx. @GoGoGadget

    FYI Looks like god rays don't work in Unity 5.6, I think i have everything set up right
     
  7. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Thanks Flurgle! I've actually been playing around with that over the past couple of days, today I also checked out another godrays effect (crepuscular rays) because it was baffling me why they're broken (no changes on my end). Looks like it's actually something on Unity's end right now, as the Crepuscular rays effect is also broken in 5.6. Something to do with doing a hard compare on the depth texture - there will be a workaround, I'm just yet to find it, but will keep on looking!
     
  8. Flurgle

    Flurgle

    Joined:
    May 16, 2016
    Posts:
    389
    Good luck figuring it out, and hopefully if it is unity, they update that.

    @GoGoGadget Oh yeah and ambient obscurance also is broken it looks like - maybe a simpler fix?
     
  9. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Just noticed that in the demo scene - if you change the "Depth Texture Mode" to DepthNormals that should fix it, just an incorrect default in theory.

    Also, PRISM 2.2 has been submitted to the store! Featuring new lens dirt, a new tonemapper to replace the "Filmic" tonemapper, and VR support (still to be tested, but I'd say it's at the 80-90% mark now).
    PRISMEasterUpdate.png
     
  10. Flurgle

    Flurgle

    Joined:
    May 16, 2016
    Posts:
    389
    GoGoGadget likes this.
  11. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    5Stars2.png
    PRISM is now 30% off for the Asset Store Mega-Sale! Get it while it's hot!
     
  12. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Hi all,
    This looks really good. Could anyone give me an objective rundown on this V the other PP's on the market for a totally outdoor scene with only Sun/Moonlight.

    Hope it's Ok to post here but if someone has a better place please point me in that direction.
     
    GoGoGadget likes this.
  13. ZoneOfTanks

    ZoneOfTanks

    Joined:
    Aug 10, 2014
    Posts:
    128
    Does it work with Vulcan? o_O
     
    GoGoGadget likes this.
  14. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    It works with Vulkan as well as Unity works with it! I love Vulkan so if you run into any compat issues (which you shouldn't unless it's a driver bug) then let me know and it'll be an ASAP fix.
     
  15. TeagansDad

    TeagansDad

    Joined:
    Nov 17, 2012
    Posts:
    957
    I'm considering it and I've had PRISM on my wishlist for a while. Could you tell me a bit about how it compares with Unity's new post processing stack?
     
  16. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Unity's Post-Processing stack is a nice start for Unity, PRISM is faster using default settings (and more customizable), just fired it up in 5.6 on the PRISM demo scene using the following effects @ 1080p:
    Ambient Occlusion, Eye adaptation, Bloom, Color LUT, Vignette, Dither, Noise, Chromatic Aberration
    Unity stack perf (on a 7970): 2.47ms
    PRISM perf (on a 7970): 1.7ms

    Which is nice, I actually haven't been able to profile the two against each other in a while as the GPU profiler's been broken in 5.6 on my card up until now. Looking at one of the most expensive effects, AO on medium settings:
    Unity: 1.356ms
    PRISM: 0.7ms

    Personally, I would still put in Unity's Post-Pro stack just to use its motion blur + TAA, which are where most of Unity's R&D seems to have gone towards. Unity's DoF is probably better for cutscenes than PRISM's DoF as well, but for standard gameplay PRISM's DoF is much easier to use and faster.

    At the end of the day, PRISM gives your game a different look. It also has a sharpen which basically becomes a requirement for any remotely realistic game once you've used it once, it really is like putting a pair of glasses on your camera. The decision you're making shouldn't really be "should I use one or the other" it should be "will my game benefit from adding PRISM" which in most cases (IMO) is a yes.
     
    TeagansDad, AndyNeoman and Gametyme like this.
  17. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Thanks for that, A really nice run down. My last decision is on which of the sharpens would work best in my game (Outdoor night and day cycle fully lit by sun) Beautify and Prism both look excellent to be fair.

    Comparison between both's sharpen for speed would be most useful.
     
    GoGoGadget likes this.
  18. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    I don't own Beautify so will let someone else help out with that, but I will say PRISM's sharpen is very close algorithm-wise to sharpens used in AAA games like The Division (which is also why it only has 1 parameter you need to change, sharpen intensity, that's it), & I have not run into a scene where it doesn't work yet.
    As for speed, PRISM's sharpen will run a touch under the 0.3ms mark @ 1080p on a 7970, and doesn't require the depth buffer to work (so in theory, it will be an order of magnitude faster than any other sharpens that use depth).
     
    AndyNeoman likes this.
  19. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Thanks again. 0.3ms is very good when you look at the benefit.

    That's all my queries answered.

    Thanks for your patience, now it's time for me to have a play around with it :).
     
    GoGoGadget likes this.
  20. TeagansDad

    TeagansDad

    Joined:
    Nov 17, 2012
    Posts:
    957
    Thanks! Purchased. This has been a very expensive week...
     
    GoGoGadget likes this.
  21. Ninlilizi

    Ninlilizi

    Joined:
    Sep 19, 2016
    Posts:
    294
    I get the following errors in my console attempting to use single pass stereo in Unity 5.5.3

    Shader error in 'Hidden/PrismEffectsSecondary': undeclared identifier '_MainTex_ST' 'UnityStereoScreenSpaceUVAdjustInternal': cannot implicitly convert from 'float2' to 'float4' at Assets/PRISM/Shaders/Prism.cginc(549) (on d3d11)
    Compiling Vertex program with UNITY_SINGLE_PASS_STEREO PRISM_USE_EXPOSURE PRISM_HDR_BLOOM PRISM_CURVE_THRESH
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING SHADER_API_DESKTOP​


    Shader error in 'Hidden/PrismEffects': undeclared identifier '_MainTex_ST' 'UnityStereoScreenSpaceUVAdjustInternal': cannot implicitly convert from 'float2' to 'float4' at Assets/PRISM/Shaders/Prism.cginc(549) (on d3d11)
    Compiling Vertex program with UNITY_SINGLE_PASS_STEREO PRISM_USE_EXPOSURE PRISM_HDR_BLOOM PRISM_USE_BLOOM PRISM_ACES_TONEMAP
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING SHADER_API_DESKTOP​
     
  22. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Thanks for the bugreport, should be a simple fix with those two - looks like I missed a few VR gotchas in the last update.
     
    Tethys likes this.
  23. Ninlilizi

    Ninlilizi

    Joined:
    Sep 19, 2016
    Posts:
    294
    I'm happy to beta test the fixes for you.

    Also, neat trick for debugging VR without having a headset.... Set the VR renderer to Side by Side mode. Sure you wouldn't want to play the game like that... But visually you can easily see if it's working or not.... It still uses the same code path as proper VR.
     
    GoGoGadget likes this.
  24. pepone3d

    pepone3d

    Joined:
    Jul 5, 2012
    Posts:
    27
    Just bought it and getting shader errors as soon as I switch to any mobile plattform (Unity 5.6). I really like this asset, so do you have an idea when this will be fixed?
     
  25. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Not aware of any shader errors on 5.6 aside from those VR ones, can you paste them here? If needed, I can send you PRISM 2.1 which definitely doesn't have any of those. They shouldn't pop up at all, but knowing Unity there's probably some VR-specific stuff that isn't getting compiled out correctly :/
     
  26. pepone3d

    pepone3d

    Joined:
    Jul 5, 2012
    Posts:
    27
    I am using Unity 5.6 f03 & building a cardboard app - not sure what's going on here if no one else reported problems...

    Shader error in 'Hidden/PrismDepthOfField': 'uv2' : no such field in structure; 'constructor' : can't convert; 'assign' : cannot convert from 'structure' to 'vec2' at Assets/PRISM/Shaders/Prism.cginc(556) (on gles)

    Compiling Vertex program
    Platform defines: UNITY_NO_DXT5nm UNITY_NO_RGBM UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER SHADER_API_MOBILE UNITY_HARDWARE_TIER1 UNITY_COLORSPACE_GAMMA

    Shader error in 'Hidden/PrismDepthOfField': invalid subscript 'uv2' at Assets/PRISM/Shaders/Prism.cginc(556) (on gles3)

    Compiling Vertex program
    Platform defines: UNITY_NO_DXT5nm UNITY_NO_RGBM UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 SHADER_API_MOBILE UNITY_HARDWARE_TIER3 UNITY_COLORSPACE_GAMMA

    .... + a dozen more :(
     
  27. Flyer_sea

    Flyer_sea

    Joined:
    Feb 20, 2017
    Posts:
    4
    Hi, I am getting this error for unity 5.6 0f3 IOS platform :
    (1) Prism is not supported on this platform, or you have a shader compilation error somewhere.
    UnityEngine.Debug:LogError(Object)
    PrismEffects:CreateMaterials() (at Assets/PRISM/PrismEffects.cs:1245)
    PrismEffects:OnRenderImage(RenderTexture, RenderTexture) (at Assets/PRISM/PrismEffects.cs:2119)

    I added prism effects component to my main camera, created a new preset, click "Play", Error. then try check "Use Bloom", "Save to preset", "Play", still getting error. Any idea on how to fix them?
     
  28. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Hi Pepone,

    Don't think I've heard of any other cardboard issues, but this is related to the VR issue, which I'm pushing a fix for hopefully tonight (if not, tomorrow). If you need 2.1 to build, PM me.

    Hi Flyer,

    First bet is to try and reimport PRISM - sometimes Unity doesn't import it properly. If you're still getting the issue, I can send you PRISM 2.1 which definitely doesn't have any iOS compilation issues while I work out what that might be.

    UPDATE: Fix for the "Shader error no uv2..." has now been submitted to the asset store
     
    Last edited: Apr 30, 2017
  29. JRRReynolds

    JRRReynolds

    Joined:
    Oct 29, 2014
    Posts:
    192
    Hey @GoGoGadget I love PRISM except for one thing -- the bloom -- it's like it is hardly existent. The only way I can get it to work is to turn it up all the way which washes out everything. Everything else on Prism works great but I really think you should look into improving the bloom and making it more like Beautify's bloom. I've tried to incorporate prism in multiple projects but each time the bloom falls short - please consider taking a look at it!
     
  30. shamsfk

    shamsfk

    Joined:
    Nov 21, 2014
    Posts:
    307
  31. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Could you possibly include some screenshots of it in action with those issues, and have you also tried playing with a few things: The advanced bloom settings, and also in debug settings, the Bloom 1/2/3/4 Intensity values? Ideally if you could send over a demo scene for me to test out that would be easier. I definitely agree that the bloom has a bit of a steeper learning curve than it needs, but after seeing what some PRISM users have sent me, I've seen some amazing results!

    Actually wanted to make sure there wasn't an issue, so I went up and fired the demo scene on with PRISM's new filmic+ tonemapping and bloom, IMO pretty good?
    Bloom On:

    Off:

    Bloom On:

    Off:



    Yes, by making the shader that renders the grass not write to depthnormals (ie - transparent shaders generally don't). You'd probably have to write your own custom shader for that, I'm not aware of any terrain shader on the store that does that.
     
    Last edited: May 3, 2017
  32. JRRReynolds

    JRRReynolds

    Joined:
    Oct 29, 2014
    Posts:
    192
    @GoGoGadget I actually was going to try it again but got shader warnings when I imported into Unity 5.6.0p3. The version I used was whatever was on the store about 10 hours ago.
     
  33. shamsfk

    shamsfk

    Joined:
    Nov 21, 2014
    Posts:
    307
    @GoGoGadget Hi!
    I have one more problem) A little one. Disabling AO on PRISM while in-game with forward camera doesn't disable depth normals rendering.
    There is a workaround - disable PRISM whole component and reenable it, but workaround is a workaround)
     
  34. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Just shader warnings? There should be nothing that's actually harmful. If you're getting exceptions though, that's an issue.

    Hi shamsfk, that is a tricky one - your best bet is to maybe just disable AO, then disable the cameras depthnormals rendering at the same time
     
  35. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Hi @GoGoGadget i'm getting this error when building to PC. Unity 5.6 Any advice?

    Shader error in 'Hidden/PrismEffects': maximum ps_4_0 sampler register index (16) exceeded at Assets/PRISM/Shaders/Prism.cginc(1021) (on d3d11)

    Compiling Fragment program with PRISM_HDR_BLOOM PRISM_USE_EXPOSURE PRISM_USE_STABLEBLOOM PRISM_USE_DOF PRISM_GAMMA_LOOKUP
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING SHADER_API_DESKTOP
     
  36. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Hey Andy,

    What effects are you using? That is unfortunately a hard limit on shader texture samplers in Unity, can't really be avoided if you've turned on every one of PRISMs effects without going into code. To fix it, you can disable any single one of PRISM's effects that uses a texture sampler - the big ones are DoF, color correction LUT, and exposure adaptation/stable bloom.
     
    AndyNeoman likes this.
  37. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Thanks, I don't use color correction, how do i remove it from compilation?
     
  38. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Quite simple, if you just untick "Use Color Correction LUT" (then to be safe, maybe restart Unity), that should do the trick.
     
    AndyNeoman likes this.
  39. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Thanks,

    Just a quick question, have you got any advice for the order of items on the camera? I have HBAO, sun shafts, smaa and some volumetric lights and fog on the camera along with prism.
     
  40. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    I have just reimported into a fresh project and now I get a different error. Is there a problem with the latest unity version 5.6.1?

    (1) Prism is not supported on this platform, or you have a shader compilation error somewhere.
    UnityEngine.Debug:LogError(Object)
    PrismEffects:CreateMaterials() (at Assets/PRISM/PrismEffects.cs:1246)
    PrismEffects:OnRenderImage(RenderTexture, RenderTexture) (at Assets/PRISM/PrismEffects.cs:2120)
     
  41. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    SMAA should go last, good sun shafts require HDR so they should go before PRISM, HBAO is a surface effect so can go after. Lights and fog, probably before but it would depend on the implementation.

    Hey Andy,

    I'm aware of one issue affecting Mac users on OpenGLCore - a patch for that has been submitted to the asset store already, pending approval. I'll PM you.
     
    AndyNeoman likes this.
  42. yc960

    yc960

    Joined:
    Apr 30, 2015
    Posts:
    228
    Is anamorphic flares planned? It would really buff up the blooms.
     
  43. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Not on the roadmap until Unity make some changes to shader keywords. Reason is below :) PRISM already uses max samplers and pretty much 'max' shader keywords.
     
  44. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    The Fog effect doesn't work correctly. And it's especially bad when Bloom is on as well. Here is a shot of Fog enabled:

    upload_2017-5-19_6-31-25.png

    Billboard trees are unaffected by the fog, but the distant mountains are almost completely opaque and rendered in front of the distant billboards. And the bloom just adds an exaggerated blur effect to everything as well.

    Here is the same shot using Linear fog from the Lighting settings:

    upload_2017-5-19_6-35-58.png

    [EDIT]
    I see the same billboard issue with Unity's GlobalFog script so that part might somehow be an issue with the trees, but I can't confirm that. However, the other strangeness is definitely PRISM. I would like to figure out the billboard issue in any case as I can't find a solution for fog that's working for me. The Lighting settings fog is a big no-no according to everything I've read. And I don't think it works in stand-alone builds anyway.
     
    Last edited: May 19, 2017
  45. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938

    I think the billboard issue is unity trees. If you use AFS v.5 or alttrees i think they work with the fog fine.
     
  46. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I have Alttrees, but haven't tried using it for this scene. Alttrees hasn't worked well for me in the past. It takes forever for the trees to appear in the scene and performance has always been bad. I may try AFS new version though if I can't find a solution. At any rate, the fog in PRISM just looks abysmal to me. Has anyone else had better success with it, especially in combination with Bloom?
     
  47. Ninlilizi

    Ninlilizi

    Joined:
    Sep 19, 2016
    Posts:
    294
    Any updates on the single pass VR bug I reported a few weeks back?
     
  48. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    There is currently an update submitted to the store (will PM you it as well) that should have all VR compilation bugs/issues fixed (at least the ones I know of). Let me know how it goes!

    Needs a rework to be honest, works in my test scene and some very stylistic scenes, but it's my bad for not testing it in more use cases. Next on the roadmap for 2.3.
     
  49. TheFoundation

    TheFoundation

    Joined:
    Jan 29, 2014
    Posts:
    20
    When I use Prism in the Editor it works just fine but once I create a build then I get this error: "Shader error in 'Hidden/PrismEffects': maximum ps_4_0 sampler register index (16) exceeded at Assets/PRISM/Shaders/Prism.cginc(1021) (on d3d11)". I understand that there is a limit. Any ideas what I can do about that if I want to use Prism?
    (I am using the latest Prism version from the asset store and Unity 5.6.0f3.)
     
  50. yc960

    yc960

    Joined:
    Apr 30, 2015
    Posts:
    228
    prism is not working 5.6.1f1 fresh project, fresh import, demo scene, unaltered, press play
    Linear space
    upload_2017-5-22_8-40-34.png
    upload_2017-5-22_8-41-24.png