Search Unity

Semantic of _LightMatrix0 in Forward / Deferred / PrePass

Discussion in 'Shaders' started by MPanknin, Nov 18, 2014.

  1. MPanknin

    MPanknin

    Joined:
    Nov 20, 2011
    Posts:
    361
    Hi there,

    Is there any documentation available on this? I'm currently playing with the new deferred shading pass in the 5.0 beta and to me it seems, that the values in _LightMatrix0 differ depending on the rendering path.

    From the name I was expecting the matrix to contain light transformation parameters (translation, rotation, scale), but obviously it doesn't.

    I'm having a hard time reconstructing the contents of the matrix by outputting the values to pixel colors. I really can't make head nor tail of it.

    It would be awesome If anyone could share some insights on this or point me to the proper documentation page.

    Have a great evening!

    Cheers,
    Martin