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

Resolved Orthographic camera prevents transparent objects from being lit

Discussion in 'High Definition Render Pipeline' started by xytor500, Mar 2, 2023.

  1. xytor500

    xytor500

    Joined:
    Mar 29, 2017
    Posts:
    73
    I'm creating a 2.5d game, and I wanted to program a parallax background by using an Unlit shader graph, and putting the material on a plane that's behind all the objects.

    However, now my transparent objects that use a Lit shader graph aren't getting affected by the lights in the scene when in front of the Unlit background.

    This only happens with orthographic camera.

    Why does this happen, and how do I fix it?

    Update: Looks like setting the orthographic camera's background type to color is enough to prevent transparent objects from getting lit.
     
    Last edited: Mar 2, 2023
  2. xytor500

    xytor500

    Joined:
    Mar 29, 2017
    Posts:
    73
  3. HIBIKI_entertainment

    HIBIKI_entertainment

    Joined:
    Dec 4, 2018
    Posts:
    594

    HDRP isn't officially supported in orthographic mode, so visual glitches in lighting shadows and transparencies are expected.

    However, if your project could work with a physical camera at a focal length set to 500-1000, you may be able to make the 2.5D idea work.
    Balance draw distances may be an issue as well.

    You may also be able to use some raytraced solutions too.
     

    Attached Files: