Search Unity

Feature Request Can you add >4 lights shadowmask

Discussion in 'Global Illumination' started by Stroustrup, Aug 7, 2020.

  1. Stroustrup

    Stroustrup

    Joined:
    May 18, 2020
    Posts:
    142
    there is no reason why there should be a four light limit in most cases, when baking mixed lights with shadowmask. you don't need to generate an occlusion map for lights that can't possibly reach the object (ie for lights that are on opposite sides of a wall)

    yet when splitting the scene into two, and loading them both additively, you are able to have 6 lights with shadowmasks that are in range of one another, though it is very cumbersome. just bake all shadow maps and discard fully black results
     

    Attached Files:

    Last edited: Aug 8, 2020
  2. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    The reason for the 4 overlapping lights limit is that the shadow mask texture has four color channels. The light overlap calculations are done without taking occluding geometry into account.
     
  3. Stroustrup

    Stroustrup

    Joined:
    May 18, 2020
    Posts:
    142
    is it possible to take occluding geometry into account, or not include the 5th light in the overlapping region specifically, or split each float color channel into two 16 bit half type, or to produce multiple textures, or is it not feasible? is there anything like this in the works?

    it would make a big difference, to my game specifically at least
     
    Last edited: Aug 19, 2020