Search Unity

Cheapest Possible transparent to black vignette on LWRP

Discussion in 'Universal Render Pipeline' started by eric_funktroniclabs, Jul 12, 2019.

  1. eric_funktroniclabs

    eric_funktroniclabs

    Joined:
    Oct 4, 2018
    Posts:
    19
    I want to darken the edges of a Magic Leap AR experience, by using a transparent and black vignette.
    We are using LWRP. Conceptually, what is the cheapest possible way to achieve this effect?

    In the old render pipline, I might add a post effect and blit the image through a shader. I'm curious if you graphics gurus had any advice or input.

    Thank you for your time!
     
  2. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,014
    Hi!
    Is there anything specific that stops you from using vignette from the postprocessing stack?
     
  3. eric_funktroniclabs

    eric_funktroniclabs

    Joined:
    Oct 4, 2018
    Posts:
    19
    That was my first inclination, but we are using Single-Pass Instanced, and at the time it didn't work. I'll try once more. [ver 2.1.7 from package manager]
     
  4. eric_funktroniclabs

    eric_funktroniclabs

    Joined:
    Oct 4, 2018
    Posts:
    19
    Getting errors like
    Code (CSharp):
    1. Shader error in 'Hidden/PostProcessing/Uber': failed to open source file: '../StdLib.hlsl' at line 21 (on d3d11)
    2.  
    3. Compiling Vertex program with FINALPASS
    4. Platform defines: UNITY_NO_DXT5nm UNITY_ENABLE_REFLECTION_BUFFERS UNITY_NO_CUBEMAP_ARRAY 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_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_DLDR_ENCODING
    5.  
    In addition to a black screen. I opened an issue about this 3 months ago, here: https://github.com/Unity-Technologies/PostProcessing/issues/795

    Seeking alternative solutions.
     
    Last edited: Jul 12, 2019
  5. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    3,014
    afaik there were some problems with shader importer at some point. Try restarting the editor, those errors should be gone.
    Issues with packages should be reported as regular Unity bugs, not in the package repositories.
     
  6. eric_funktroniclabs

    eric_funktroniclabs

    Joined:
    Oct 4, 2018
    Posts:
    19
    That explains a lot! I'll report it in the usual way. In the meantime, I will have to find an alternative.
     
  7. CoCoNutti

    CoCoNutti

    Joined:
    Nov 30, 2009
    Posts:
    513
    I'm using postprocessing, just one simple scene, and on iPad Air I get memory warnings/crashes.