1. We're looking for feedback on Unity Starter Kits! Let us know what you’d like.
    Dismiss Notice
  2. Unity 2017.2 beta is now available for download.
    Dismiss Notice
  3. Unity 2017.1 is now released.
    Dismiss Notice
  4. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  5. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice
  6. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice

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

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

  1. Sebane1

    Sebane1

    Joined:
    Apr 8, 2014
    Posts:
    7
    I'm running into the same issue as well.
     
  2. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    530
    Fix for this was submitted to the Asset Store last week, pending approval - I would be very surprised if they don't approve it in the next few days. If you need a version right now, you can PM me w/order # and I'll get it to you.

    I can reproduce the error, but it doesn't (and shouldn't) affect the build (Unity seems to do a recompile of all shader keywords the first time you build, but only puts in what you're using after that) - if your build is actually breaking because of it, PM me your PRISM inspector and I'll repro it to see what's going on.
     
  3. TheFoundation

    TheFoundation

    Joined:
    Jan 29, 2014
    Posts:
    4
    Thanks for looking into it. The effects worked. Is there any way to silence the error if it is not an actual issue?
     
  4. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    2,199
    I just started getting this as well on Unity 5.5.3f1.

    [EDIT]
    Mine went away when I removed Sharpen.

    [EDIT 2]
    Spoke too soon. here is the error I'm getting.

    Shader error in 'Hidden/PrismEffects': maximum ps_4_0 sampler register index (16) exceeded at Assets/PRISM/Shaders/Prism.cginc(1045) (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

    An earlier post made it sound like if I didn't select certain options then they wouldn't be compiled, but I'm not using DOF or Exposuer for sure and yet it's still trying to compile those. Are these able to be disabled in the shader somewhere?

    [EDIT 3]
    I followed the documentation and reduced some shader keywords and that seemed to make the problem go away for now.

    [EDIT 4]
    OK, so the compiler error is back. It just comes and goes. I guess I didn't solve anything. Any help would be much appreciated.
     
    Last edited: May 25, 2017
    GoGoGadget likes this.
  5. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    530
    On my TODO for next patch along with fog - no-one likes error spam so will work out some way to get around this.
     
  6. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    530
  7. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    2,199
    How do I solve this error:

    Shader error in 'Hidden/PrismEffects': maximum ps_4_0 sampler register index (16) exceeded at Assets/PRISM/Shaders/Prism.cginc(1045) (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
     
  8. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    530
     
  9. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    2,199
    Oh, I see. I guess I missed that. It seems to look correct, but I wasn't sure. Thanks for the info.
     
    GoGoGadget likes this.
  10. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    530
    Just an FYI to all - I'm travelling on annual leave from tomorrow for 2 weeks, so replies may be quite delayed with limited access to email during that time.

    If you're having issues, make sure you've updated to the latest PRISM, reimported, and tweaked settings first - these steps can often solve a lot of problems!
     
  11. shamsfk

    shamsfk

    Joined:
    Nov 21, 2014
    Posts:
    175
    I can't use the latest prism on MacOSX (gamma space)

    (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)
    UnityEditor.DockArea:OnGUI()

    Event on a clear new project
     
    Last edited: Jun 4, 2017
  12. shamsfk

    shamsfk

    Joined:
    Nov 21, 2014
    Posts:
    175
  13. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    3,615
    Did you see the post just above yours where the dev says he's away for the first two weeks of June? He says he'll have limited email, so if you need support right away, you could try that, see if it helps.

    Also ... if you are using U5.6.1, I was just reading in another thread that "Unity 5.6.1 drastically changes the way cameras render to RenderTextures." Unity 5.6.0 does not have this bug / feature.
     
    TeagansDad and Acissathar like this.
  14. shamsfk

    shamsfk

    Joined:
    Nov 21, 2014
    Posts:
    175
    Thanks! I missed that.
     
  15. shamsfk

    shamsfk

    Joined:
    Nov 21, 2014
    Posts:
    175
    This is unacceptable. Asset is not working with 5.6.1 and not a single word from developer. Annual leave or not, it is frustrating.
     
  16. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    349
    People are allowed vacation time.

    I get that it's frustrating, but you're acting as if the developer has abandoned the asset or will be gone for a year, just because they're taking a few weeks off, which they gave everyone a heads up about.
     
  17. TeagansDad

    TeagansDad

    Joined:
    Nov 17, 2012
    Posts:
    439
    Agreed with @Acissathar. You're being ridiculous. So because he published something on the Asset Store, he's not allowed to take two weeks off? Perhaps he's traveling somewhere that has poor/nonexistent internet service. Or maybe he just wants to get away from computers and smartphones for a couple of weeks. I certainly wish I could do that more often.

    Today is precisely the end of the "first two weeks of June" anyway. We're not even through the time he said he'd be gone.

    The single worst thing about modern communication is that it seems to create this obligation for everybody to be immediately available, all of the time. Sometimes I just want to toss my smartphone away so that at least I don't have people getting mad at me for missing their calls or not responding to their text messages.
     
    magique, abrasive and chiapet1021 like this.
  18. shamsfk

    shamsfk

    Joined:
    Nov 21, 2014
    Posts:
    175
    Well, it looks like you chaps don't have anything important going on, most likely no deadlines. I honestly envy you, but on a schedule life is brutal and 2 weeks of a delay is kind of a big thing (and posts are a major thing even in a weekly builds).

    Developer should check his asset before leaving for a while. It is a COMMERCIAL product.

    You can go as white of a knight as you can, but it won't change the fact of an asset been totally unusable, and I seriously couldn't care less about developer's vacations.

    P.S. I was forced to go with Beatify to keep pumping builds, and found it to be better post overall, like way better (bokeh is superb and sharpen is godly). It is stable, from the beginning I had 0 troubles using it, and the only thing that still holds me on to PRISM is it's excellent AO.
     
    Last edited: Jun 15, 2017
  19. abrasive

    abrasive

    Joined:
    Aug 10, 2014
    Posts:
    100
    For AO I can recommend you 2 super nice assets:

    Amplify Occlusion - for inside building scenes - https://www.assetstore.unity3d.com/en/#!/content/56739
    HBAO - for outside scenes - https://www.assetstore.unity3d.com/en/#!/content/54780

    Beautify looks like much more professional asset for me ;)
     
    jimburn and shamsfk like this.
  20. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    2,199
    If your business relies on AAA support 24/7 then you probably made a really bad business decision to buy a cheap asset maintained by a single developer. Seems to me like you should be blaming yourself not the developer.
     
  21. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    3,615
    Not to pile on, but developing on the very latest release of Unity - with 5.6.1 being released something like just 3 weeks ago - and needing all the plugins to be updated and bugfixed before an immediate project deadline ... that's very likely to create a problem right there.

    As a general rule, never update to the very latest version of Unity right before a deadline.
     
    magique and TeagansDad like this.
  22. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    2,199
  23. shamsfk

    shamsfk

    Joined:
    Nov 21, 2014
    Posts:
    175
    That's generally true except but this one has critical networking bug fix.

    That is absolutely true.
     
    Last edited: Jun 16, 2017
    hopeful likes this.
  24. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    2,199
    @shamsfk I upgraded to 5.6.1p2 and see the same issues. Trying to figure out how to solve it right now, but I'm not a shader expert. If I figure it out I'll let you know.
     
    hopeful likes this.
  25. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    2,199
    I figured it out @shamsfk. Just add the following declaration near the top of the offending shader:

    half4 _MainTex_ST;

    I put mine right under the following declaration:

    half4 _MainTex_TexelSize;
     
    shamsfk and hopeful like this.
  26. jimburn

    jimburn

    Joined:
    Apr 1, 2017
    Posts:
    52
    Prism version 2.2.13: Lens flares are shooting Render Texture errors every second, and after a while crashes the video card with hard reboot. I want to use this effect in a specific part of my game, but with these errors, I have to stop using Prism until it is fixed.
    Note: I am not using HDR Bloom.

    Everywhere this: RenderTexture.ReleaseTemporary(featurePass); is doing the error.
    It seems that featurePass is lost before releasing. I tried to check if featurePass is null to avoid the problem, but it seems more related to the complex "goto" system logic. Hopefully the author can give me a quick fix?

    best

    upload_2017-6-16_21-0-27.png
     

    Attached Files:

    Last edited: Jun 17, 2017
  27. TeagansDad

    TeagansDad

    Joined:
    Nov 17, 2012
    Posts:
    439
    @jimburn - I assume you're on 5.6.1?

    They made some significant changes to how RenderTextures work in 5.6.1, and a lot of assets are broken right now with regards to that feature.
     
  28. jimburn

    jimburn

    Joined:
    Apr 1, 2017
    Posts:
    52
    Yes 5.6.1f1, what did they change exactly? Maybe I can fix myself?
    I checked the list of the changes, it is huge and confusing.
     
  29. jimburn

    jimburn

    Joined:
    Apr 1, 2017
    Posts:
    52
    Ok I have fixed the bug.

    Here are the change in PrismEffects.cs:

    Change this (see the comment)
    Code (csharp):
    1.  
    2.         ReleaseRenderTextureArea:
    3.         RenderTexture.ReleaseTemporary(raysTex);
    4.         RenderTexture.ReleaseTemporary(tempDest);
    5.         RenderTexture.ReleaseTemporary(tempDofDest);
    6.         RenderTexture.ReleaseTemporary(fullSizeMedian);
    7.         RenderTexture.ReleaseTemporary(dofTex);
    8.         RenderTexture.ReleaseTemporary(aoTex);
    9.         RenderTexture.ReleaseTemporary(blur1Dof);
    10.         //RenderTexture.ReleaseTemporary(featurePass); remove this here, you need to release it somewhere else.
    11.  
    In the HDR part of the blur code
    Here is a real bug I think : At lines 2407 replace
    Code (csharp):
    1.  
    2.                         RenderTexture.ReleaseTemporary(blurOne);                                                          
    3.                         m_Material.SetTexture("_FinalFlareTex", featurePass);
    4.  
    With
    Code (csharp):
    1.  
    2. // apparently the author has inverted the blurOne with featurePass
    3.                         RenderTexture.ReleaseTemporary(featurePass);                                        
    4.                         m_Material.SetTexture("_FinalFlareTex", blurOne);
    5.  
    In the "simple" Blur code
    Be sure that at line 2329 you have
    Code (csharp):
    1.  
    2.                 if(useBloomFlares)
    3.                 {
    4.                     //Flip and features
    5.                     Graphics.Blit(halfRezColorDown, featurePass, m_FlaresMaterial, 0);
    6.                  
    7.                     //Blur to make ghost artifacts less ghosty
    8.                     //featurePass = BlurTex(featurePass, 1);
    9.                     RenderTexture blurOne = RenderTexture.GetTemporary (halfRezColorDown.width, halfRezColorDown.height, 0, halfRezColorDown.format);
    10.                     Graphics.Blit (featurePass, blurOne, m_Material2, 14);
    11.                     Graphics.Blit (blurOne, featurePass, m_Material2, 13);
    12.                     Graphics.Blit (featurePass, blurOne, m_Material2, 0);
    13.                     RenderTexture.ReleaseTemporary(featurePass);
    14.                  
    15.                     //Add
    16.                     m_Material.SetTexture("_FinalFlareTex", blurOne);
    17.                 }
    18.  

    Once these changes made, featurePass is always released correctly and does not need to be released with the pool at the end of the script.
     
    Last edited: Jun 17, 2017
    GoGoGadget and shamsfk like this.
  30. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    530
    Hi all,

    Apologies for the delay in responding, back in the country now (worth noting though - if you are actually in production, it's always recommended to stick on a version of PRISM that works for you and not update mid-project unless required for a bugfix!). Thanks for catching that bug Jimburn, a new update for the latest version of Unity will be tested & submitted to the asset store for approval this weekend, any users that need it sooner can PM me.
     
    shamsfk and jimburn like this.
  31. shamsfk

    shamsfk

    Joined:
    Nov 21, 2014
    Posts:
    175
    Hi! Thanks for the patch, it works now!)

    I have a trouble. I'm using gamma space forward mode and I'm now using standard Unity's stack for motion blur and DoF.
    When I turn Unity Post ON (even with no effects enabled) PRISM AO fails - paints whole screen gray (depth normals mode). Can it be solved?

    EDIT: I was able to make it work by enabling Unity's Post's AO and setting it to the minimum value (to not have a visible effect) (but not 0 as it has the same effect as having it turned off - PRISM AO fails) but as you can tell I'm now making 2 AO calculations wich is unacceptable. Looks like Unity's standard post stack tweaks something in a chain. Can you force that whatever to be done correctly?

    And by the way, please look at Unity's DoF it is so much superior to what PRISM currently have - the blur is more organic and clean on an eye (especially in near blur the difference is light years, it blurs edges nicely, and the whole effect is kinda buttery smooth).
     
    Last edited: Jun 21, 2017
  32. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    2,199
    Didn't it work for you with the fix I suggested earlier?
     
  33. shamsfk

    shamsfk

    Joined:
    Nov 21, 2014
    Posts:
    175
    I had no chance to implement it, an author appeared before I got to it. As I moved to other posts it was no rush anymore. But it is still very appreciated! Thank you!
     
    magique likes this.
  34. jimburn

    jimburn

    Joined:
    Apr 1, 2017
    Posts:
    52
    I have this persistant error when I am building a project.

    Code (csharp):
    1. Shader error in 'Hidden/PrismEffects': maximum ps_4_0 sampler register index (16) exceeded at Assets/PRISM/Shaders/Prism.cginc(1045) (on d3d11)
    2.  
     
    GoGoGadget likes this.
  35. Chosko

    Chosko

    Joined:
    Jun 24, 2017
    Posts:
    2
    Hi, apparently PRISM doesn't support the "Single Pass" Stereo Rendering Method (Unity says you need to change the Post-Processing shaders to support it). https://docs.unity3d.com/Manual/SinglePassStereoRendering.html

    I tried the preset "Preset_DownToOne" on an empty scene with just a textured plane, and this is the result.

    With "Multi Pass" Rendering Method
    MultiPass.png

    With "Single Pass" Rendering Method
    SinglePass.png

    Of course, disabling PRISM with "Single Pass" everything works...

    I took a look at the source code, and I noticed there's actually no support for this feature in PRISM.

    I know it would require a lot of changes in the shader, but please, consider to support the Single Pass method, as in VR it's used a lot, because it significantly reduces CPU usage and allows developers to add more features into their games.... For instance in my game if I use "Multi Pass" I have 60/70 fps and when I use "Single Pass" I have 100+ fps...


    PS: you can see this bug only in play mode with an headset
     
    Last edited: Jun 24, 2017
    GoGoGadget and abrasive like this.
  36. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    530
    Hi Jimburn, this error shouldn't affect anything in production - just the Unity shader compiler complaining about something that only occurs when all texture-based effects are enabled, which should never really happen.

    This is 100% on Unity's end with the AO - but try tweaking the AA method in Unity's PostFX stack, I've had some success with doing that for whatever reason.
    Also, yes, it is recommended to use Unity's DoF for cutscenes. PRISM's DoF is a different algorithm designed for background/far-field DoF mainly. Currently working on another option though.

    Hey Chosko,

    Definitely would like to work on this for future updates, I've heard from some users that some effects work, but not everything - it's very hard for me to test in a real production scenario as I don't have an HMD. Could you PM me some more info, like what effects are turned on there/what effects work for you in multipass/etc?
     
    jimburn likes this.
  37. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    2,199
    From my experience this does actually affect production. A stand-alone build will fail 50% of the time with this error. I basically have to attempt a build, which will fail with this error and then build again, which then produces the stand-alone executable. So, if this can be fixed then that would be great.
     
  38. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    530
    Noted - for a temp fix, you can check out the guide section on "Removing shader keywords" - removing one or two that use textures will fix this.
     
  39. jimburn

    jimburn

    Joined:
    Apr 1, 2017
    Posts:
    52
    I confirm, when doing a build and run, the build will stop because of this error. But if you do only a build (not run), the build works. Don't ask me why. (latest version of Unity 5.6xx)
     
    GoGoGadget likes this.
  40. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    2,199
    I got it to go away I think by removing keywords.
     
  41. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    2,199
    Has anyone tried on the Unity release candidate 2017.1.0f1?
     
  42. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    530
    New update (2.3) should be submitted to the asset store by the end of today, fully focused on stability.
    • Sharpen should now work in VR
    • Sharpen effect intensity is now stronger
    • Removed 2 texture samplers (one from the deprecated fake 'godrays' effect that has been removed)
    • Simplified flares and improved performance by combining the color/starburst textures into one texture
    • Texture sampler warning should no longer occur on build
    • Tidied up some warnings
     
    shamsfk likes this.
  43. Chosko

    Chosko

    Joined:
    Jun 24, 2017
    Posts:
    2

    Hey, where can I send you a patch? I should have fixed all the effects for Single Pass (VR).
     
    Last edited: Jul 1, 2017
  44. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    530
    PM'ed you!
     
  45. Gamrek

    Gamrek

    Joined:
    Sep 28, 2010
    Posts:
    62
    Is there any special setup for Oculus? I am getting two images (right and left) together. I am also using Oculus SDK camera, does it make a different?
     
  46. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    530
    Hey Gamrek, next update includes a bunch of VR fixes (thanks to Chosko above), feel free to PM me if you need them soon (the patch is currently submitted to the store and pending unity approval).
     
  47. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    2,199
    Which tone mapping is fastest? Rom B, ACES, or Flimic?
     
  48. MarkusGod

    MarkusGod

    Joined:
    Jan 10, 2017
    Posts:
    30
    What bloom settings should I use for android game? (if it compatible at al) I can't get playable FPS.
     
  49. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    530
    They're all so similar it's not worth worrying about, go whichever fits the look of your game. ACES is for your stock standard tonemapping, the same as what most AAA games use, Rom B gives a different look that can work very well in some styles, PRISM's new version of Filmic is the most subtle of the three.

    Go into debug settings, and tick "Use different mobile bloom" - this setting is not recommended for all androids, just the few who have GPUs that struggle with PRISM's median filter.
    [​IMG]
     
    MarkusGod and magique like this.
  50. yc960

    yc960

    Joined:
    Apr 30, 2015
    Posts:
    201
    How unity processing stack v2 has a way to load custom effects, is it compatible with this asset?