1 Reply Latest reply on May 26, 2010 5:47 PM by Nasenbaer

    Lighting in domain shader?

    niexuchina
      Do lighting for per several pixels instead of per pixel.

      I think that per-pixel lighting is unneeded. I think that it's a better choice to do lighting per several pixels and interpolate the result to per-pixel. In DX11 we can generate primitives by tessellation, and each primitive covers several pixels. So we can do lighting in domain shader for each generated vertex, and blend the interpolated lighting result with textures and other stuff in pixel shader.

      I also have tried rendering to a smaller sized texture, 1/2 sized, and then enlarging it to full screen. The lighting was good but aliasing was too heavy.

        • Lighting in domain shader?
          Nasenbaer

          Per-Vertex-Lighting is quite old and was used a long time before GPUs were powerful enough to do per-pixel-lighting. So it's nothing special.

          The problem is that specular highlights are looking very ugly. You have to enormously increase the vertex density to overcome this problem. And this would also have an impact on the overall performance. In other words do per-pixel-lighting - it's better in most situations I think.