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

LWRP global illumination/lighting issues.

Discussion in 'Universal Render Pipeline' started by DungeonBrickStudios, Oct 7, 2019.

  1. DungeonBrickStudios

    DungeonBrickStudios

    Joined:
    Jun 9, 2015
    Posts:
    69
    I have a polygon graphics 3d infinite runner in progress, and due to the nature of the assets being used, I can't do baked lighting because levels are being generated randomly on the fly.

    This means I have to use a realtime directional light. I have one shining directly downwards, but this causes many dark spots or completely black areas on ceilings of levels. I could switch materials to be unlit, but with polygon graphics this just makes my game look like Untitled Goose Game. Awesome for that game, but they don't work on my own project.

    Does anyone know of a solution to this? Adding another directional light does not seem to be working either as LWRP does not allow for 2 to work at the same time. Even with lights set to more than 1 in the asset.

    I pretty much just want everything to be decently lit while still maintaining that polygonal appearance.
    I've searched quite a bit for a solution, but I've not been able to find anything that has worked. Any help would be greatly appreciated.
     
  2. Shane_Michael

    Shane_Michael

    Joined:
    Jul 8, 2013
    Posts:
    158
    Create an unlit shader graph, assign a cubemap, use the world-space surface normal to sample the cubemap to multiply that by your albedo and ambient occlusion, and hook that up to the emissive channel. That will give you a lot of control over the lighting coming in from every direction, and you can blend between two cubemaps for transitions.

    There are a lot of free cubemaps out there, and you can also bake any lighting you want into a scene and capture a cubemap from that to use.