Search Unity

Vertex Lighting (4Light)

Discussion in 'General Graphics' started by GenesisAria, Nov 7, 2020.

  1. GenesisAria

    GenesisAria

    Joined:
    Dec 15, 2017
    Posts:
    1
    I've been spending some time with a friend trying to work out some kinks for a very simple vertex lighting model for toon-like shaders, with the goal to avoid using the add pass for lights altogether.

    We came up with a lot of ideas for utilizing Unity_4Light, but the issue is always the way the slots swap over. Does anyone know the formula unity uses for determining which light goes into which slot? Knowing the closest/brightest goes to the first slot gives a general idea, but to be able to perform smooth transitions in a shader only, we'd need to know exactly when it changed slots so a blend can be lined up with it.

    Unless there is some other kind of solution i have not thought of to work with vertex lights?