Search Unity

Feedback Light attenuation - Ability to have less realistic lighting

Discussion in 'Universal Render Pipeline' started by Lowscope, Oct 5, 2019.

  1. Lowscope

    Lowscope

    Joined:
    Jun 4, 2015
    Posts:
    11
    Since LWRP 4.0.0 came out, a new falloff for point lights was introduced. This is good for realistic games, however I'm working on a dungeon crawler that has a light source coming from above the player. This results in very bright areas when the light is near a wall.

    I would like to switch to the LWRP, however for this game it seems like it is a bad fit.
    Unless someone here can give me some advice on modifying the pipeline to more fit my needs?

    Image below that displays the issue I'm having.

     
    Rich_A likes this.
  2. Shane_Michael

    Shane_Michael

    Joined:
    Jul 8, 2013
    Posts:
    158
    You can check out the custom lighting node for Shader Graph:
    https://blogs.unity3d.com/2019/07/31/custom-lighting-in-shader-graph-expanding-your-graphs-in-2019/

    The nice thing about LWRP/URP is that all the code is open source so you can create your own version and have full access to the shaders. The attenuation function is in ShaderLibrary/Lighting.hlsl, I believe, and you can customize it as much as you want. However, that can be a bit of extra work if you want to upgrade the pipeline version and your modifications conflict with updates.

    If you have relatively simple lighting requirements, the Shader Graph method will be easier to maintain.
     
    Lowscope likes this.