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. Dismiss Notice

5.3 - Deferred shading lighting not applying

Discussion in 'Shaders' started by harvz13, Jan 30, 2016.

  1. harvz13

    harvz13

    Joined:
    Jan 30, 2016
    Posts:
    2
    Hi all,

    The other day I updated my Unity version from 5.2.4f1 to 5.3.1p4 and it seems to have broken our custom lighting from our modified Internal-DeferredShading file.

    I was wondering if this was an intentional change (In which case, how would I go about implementing this into 5.3) or if this is a bug in which case I'll have to go and roll back. Below is an image comparing the two versions, both are exactly the same project opened in the different editor versions:

    Any help would be appreciated.

    Edit: I just tested on the latest version (5.3.2p1) and it's broken
     
    Last edited: Jan 31, 2016
  2. harvz13

    harvz13

    Joined:
    Jan 30, 2016
    Posts:
    2
    Ok, in Unity 5.3 the default lighting was changed to GGX which breaks the solution I was using. I've come up with a solution that brings back the old 5.2 lighting solution by copying the UNITY_BRDF_PBS functions from 5.2's 'UnityStandardBRDF.cginc' into my custom deferred shader.

    So while this does solve the problem, it's not exactly the best way of going about it. Is there a way to accomplish this with unity's new lighting system?
     
  3. Michal_

    Michal_

    Joined:
    Jan 14, 2015
    Posts:
    365
    I wouldn't call it a bad solution. The whole purpose of overriding "Internal-DeferredShading" is to let you use custom lighting model. I mean, if you're happy with brdf copied from 5.2 + your modification then just use it.
    Otherwise, you have to change your Internal-DeferredShading to make it work with unity's new lighting system. We can't really help you with that without seeing your modifications first.
     
  4. hypeatized

    hypeatized

    Joined:
    Nov 2, 2015
    Posts:
    3
    I have the exact same problem posted in another thread. Your solution sounds good enough so I've tried but I can't get it to compile. Where exactly did you put the code from 5.2 and what parts did you take?