I agree on both points, but cant do anything about them.
I just hoped this "simplistic" shader would be 'good enough'.
A PP shader can only work with the rendered result, and therefore cannot
'extract' the real colors from an 'un-lit' or darkened view.
(UNLESS the PP shader is "creating" the darkness, rather than creating a light)
Ah well... That never looks to good IMHO anyway...
But I must question why arent you just using a dynamic-light for the torch?
Like this?
ENTITY* torch = NULL;
void torch_startup()
{
while(!level_ent) wait(1); //wait till level is loaded.
if(torch==NULL) { torch = me = ent_create(0,0,0); }
//
// torch DEFAULT settings
my.skill1 = 1; //default to torch ON
my.skill2 = 1000; //default to lightrange 1000
//
set(me, PASSABLE|INVISIBLE|SPOTLIGHT);
vec_set(d3d_spotlightcone, vector(15,15,1)); //set torch cone-shape
while(torch)
{
if(my.skill1==1) my.lightrange = my.skill2;
else my.lightrange=0;
//
vec_set(my.x, camera.x); //follow camera position
vec_set(my.pan, camera.pan); //follow camera direction
//
wait(1);
}
}
The problem with the center-position moving on screen-changes,
I THINK, is more my demo code rather than my shader.
(But thats beside the point now)