Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Feedback 0a12 URP Shader Graph-based skybox issue + workaround (vs. 0a11)

Discussion in '2022.2 Beta' started by adamgolden, May 7, 2022.

  1. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,548
    0a12 has an issue with skybox Shader Graphs that use cubemaps while Allow Material Overrides (or Cast Shadows) is enabled in the Graph Settings dialog.

    Previously (0a11), neither of these settings had any apparent effect. While a skybox shader will probably never need shadows or overrides enabled (i.e. this isn't necessarily a "bug"), I wasn't initially aware of what caused things to break during upgrade from 0a11 to 0a12, so ..yeah, if issues like this arise for anyone else it's easy to solve.

    For repro, a new project with the 3D (URP) template.
    1. Add any cubemap asset to the project.
    2. Replicate this graph (URP, Unlit) and assign it to a material.
    shader.jpg
    3. Select the material and assign the cubemap to it in the Inspector.
    4. Assign the material to Skybox Material under Lighting->Environment settings.
    5. Look around in Scene.

    Normal result (0a11):
    normal.jpg

    Broken result (0a12, if either property is enabled):
    broken.jpg broken2.jpg

    The issue can be worked around by making sure both Allow Material Overrides and Cast Shadows are unchecked in the Shader Graph Editor.
    workaround_is_both_must_be_unchecked.jpg

    Additional notes:
    - both 0a11 and 0a12 are using the same version of URP (14.0.2).
    - does not happen if the material is assigned to an object (for example a sphere).
    - does not happen in builds, only the editor (confirmed for WebGL and Windows 10 64).
    - probably occurs regardless of Graphics API (tested DirectX11 and OpenGLES3).
     
    Meryuhi, TaeJ, bunpro and 1 other person like this.
  2. theman224

    theman224

    Joined:
    Mar 23, 2017
    Posts:
    5
    Thanks, had the same issue and this fixed it for me :)
     
    adamgolden likes this.
  3. bunpro

    bunpro

    Joined:
    May 22, 2019
    Posts:
    5
    Thank you so much! - had just upgraded to 2022.2 & URP 14 and immediately had this problem
     
    adamgolden likes this.