Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Reflection Probe Blending on SemiTransparent objects with alpha [DX9]

Discussion in 'General Graphics' started by RyanFavale, Apr 26, 2017.

  1. RyanFavale

    RyanFavale

    Joined:
    May 30, 2014
    Posts:
    28
    On Windows PC w/ DX9:
    If I setup a scene with 2 or more reflection probes that intersect, they do not blend on semi-transparent surfaces, specifically for a water shader. I've tried this both with the standard shader and custom shaders. The reflections seem to be bugged where the blend is supposed to happen, where I get multiple copies of the reflection tiled onto the surface where the blend is supposed to be.
     

    Attached Files:

  2. RyanFavale

    RyanFavale

    Joined:
    May 30, 2014
    Posts:
    28
    You can see a comparison here where I have the water surface set onto the "Transparent-2" layer with alpha enabled, compared against the water set onto the "Geometry+50" layer with alpha disabled.

    Alpha enabling and disabling is done between these two lines in the shader:
    #pragma surface surf StandardSpecular vertex:vert
    #pragma surface surf StandardSpecular vertex:vert alpha
     

    Attached Files:

  3. RyanFavale

    RyanFavale

    Joined:
    May 30, 2014
    Posts:
    28
    Here is a better comparison between rendering the water surface semi-transparent with alpha in the transparent render queue, and then opaque in the geometry render queue.
     

    Attached Files:

  4. INedelcu

    INedelcu

    Unity Technologies

    Joined:
    Jul 14, 2015
    Posts:
    169
    Per pixel reflection probe blending works only in Deferred Shading pass and only for opaque meshes, transparent objects are rendered separately after deferred rendering and the probe blending is constant per object.
     
  5. RyanFavale

    RyanFavale

    Joined:
    May 30, 2014
    Posts:
    28
    Thanks. :)
    Probe blending on transparent objects is not supported. Got it.