[RESOLVED] HLSL - Get Destination Pixel?
Hi,
Its been a while since I posted but here goes. I want to get the colour of a pixel 'below' (to be rendered over) so that I can decide if I want to render a new pixel on top of it.
I am trying to use multiple lights in my scene and I want to check if a pixel is lighter than the new pixel. So that the only places that are dark are those without any lights shining on them.
Ultimately I am trying to achieve a 2D lighting engine that supports more than one light. Can I achieve this any easier?
Any help is appreciated! :)
Re: [RESOLVED] HLSL - Get Destination Pixel?
I first created a new technique that shaded each object black. Then, for every light I shaded each object normally EXCEPT I set the alpha value of each pixel to be as dark as the pixel. Therefore it would 'show through' and I would get additive lighting.