Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Thursday, June 8, for a Q&A with Unity's Content Pipeline group here on the forum, and on the Unity Discord, and discuss topics around Content Build, Import Workflows, Asset Database, and Addressables!
    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


    Jun 17, 2019
    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.
    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):

    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.

    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


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


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