Pixelshade colors based on geometries

Hi,

Does anyone have any suggestions for how to shade pixels based on the position of overlaid primitives?

For example, where a quad visibly overlays an image texture, to multiply the original pixels, or reduce their alpha level.

I’ve attached the closest I’ve got to it, but with this method I have to apply a new color entirely as the original texture is not accessible to the pixelshader.

Screenshot: http://tinypic.com/r/242z70l/4

Thanks,
Andy

colortest.zip (181.7 kB)

In case anyone is wondering, the solution is to make a ‘simple mask’ and add another texture in the pixelshader. Then you can use the values from the ‘mask’, to manipulate the desired texture (see attached patch).

You can then do further programming to make the mask more useful, i.e. sliding scales of values rather than just a simple threshold…

Andy

The solution patch (181.1 kB)