Search Unity

Strange behaviour of per-vertex lights in Forward rendering path?

Discussion in 'Global Illumination' started by crdgre, Sep 20, 2018.

  1. crdgre

    crdgre

    Joined:
    Jul 14, 2015
    Posts:
    6
    Docs:
    In Forward rendering path with Mobile/VertexLit shader or Vertex Lit rendering path point lights with not important mode are rendered correctly.

    But in Forward rendering path and shader set to Standard, Legacy Diffuse or Mobile Diffuse point lights become unpredictable. Moving one light causes another to change its intensity to smaller value or even zero. Note that there only 3 point lights.

    Unity 2017.4.5f1
    Updated to 2017.4.11f. Didn't helped.

    Demo:


    Example: VertexLit, 3 per-vertex point lights with different color.


    Forward rendering with Standard shader: one of the per-vertex lights color values decreased
     
    Last edited: Sep 20, 2018
  2. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,493
    The extra light that are not important are rendered to a spherical harmonics which is a fast approximation of light baked on an equation, it can take virtually unlimited light but lack some of the quality of a real light.

    vertex light is a real light but evaluated as vertex color, and then are interpolated between vertex, sit has strange shpae that follow the shape of the triangle that hold teh vertex, so if the light is in between vertex, the vertex don't receive the full intensity, and they are interpolated which mean we lose even more intensity in between. since there is fewer vertex than screen pixel, it's faster, it's generally used for static design for it, lod in the distance and are too small, unimportant objects or low spec machine.
     
    fguinier likes this.