In my 2D game, I render tiles. I want to do lighting without needing an extra buffer the size of the screen.
Either in glsl or hlsl, what could I feed to the shader each time I render a bitmap so that it knows what pixel on the scren it will fall on. That way I can do per pixel lighting.
Currently I only get the UV coord relative to the texture, not the screen.
Thanks
Using ps 2.0

gl_FragCoordnot work for you? – edA-qa mort-ora-y Aug 19 '12 at 17:51