Hi Rei.

Give this one a try... Its VERY MUCH a work-in-progress though.
Its just a pixel shader so all you do is attach it to the camera and set
up a few material skills.

This STAND-ALONE demo should explain all you need.
Just give it a level in the start of "main()" and run it...

Code:
#include <acknex.h>
#include <default.c>

MATERIAL*	mTorch =
{	effect = "
	Texture TargetMap;	
	float4 vecViewPort, vecSkill1, vecSkill5, vecSkill9;
	sampler2D TexMap = sampler_state	{	Texture = <TargetMap>;	};
	//---------------------------------------------------------------------------------------
	//---------------------------------------------------------------------------------------
	float4 PS_Torch(	float2 tex:TEXCOORD0	):COLOR
	{
		float	 ratio = vecViewPort.x/vecViewPort.y;
		float2 dir   = vecSkill1.xy - tex;
		float  r_dist  = sqrt( pow(dir.x*ratio, 2) + pow(dir.y,2) ) ;
		float4 color = lerp(0, tex2D(TexMap,tex), saturate((r_dist-vecSkill1.w)*vecSkill5.w));
		return saturate(tex2D(TexMap,tex) + color * vecSkill5/64);
	} 
	//---------------------------------------------------------------------------------------
	technique Torch {	pass p0	{	PixelShader = compile ps_2_0 PS_Torch();		}	}
	//---------------------------------------------------------------------------------------
			";
}
VIEW*		vTorch =	{	material = mTorch;		flags=CHILD|PROCESS_TARGET;		}


function main()
{	wait(1);	level_load("testlevel.wmb");	wait(5);
	
	//Position and Size Settings
	var density=0.5, radius=0.35, mouse_x=0, mouse_y=0;
	mTorch.skill1 = floatv(mouse_x);	//X_POS   == focus X position	(range  0 to 1)
	mTorch.skill2 = floatv(mouse_y);	//Y_POS   == focus Y position	(range  0 to 1)
	mTorch.skill3 = floatv(density);	//DENSITY == small, around 0.5	(range -1 to 1)
	mTorch.skill4 = floatv(radius);	//RADIUS  == small, around 0.2	(range  0 to 1)
	

	//Contrast color Settings
	var speed=-15;
	mTorch.skill5 = floatv(125);		//Torch "contrast" color Red component
	mTorch.skill6 = floatv(125);		//Torch "contrast" color Green component
	mTorch.skill7 = floatv(125);		//Torch "contrast" color Blue component
	mTorch.skill8 = floatv(speed);	//FADESPEED == around 0.25		(range  0 to 5)
	
	while(1)
	{
		if(key_space)	camera.stage = NULL;			//hold space to DISABLE torch
		else				camera.stage = vTorch;

		mouse_x = clamp(mouse_cursor.x, 0, screen_size.x)/screen_size.x;
		mouse_y = clamp(mouse_cursor.y, 0, screen_size.y)/screen_size.y;
			DEBUG_VAR( mouse_x, 50);
			DEBUG_VAR( mouse_y, 70);

		if(key_cuu)	density += 0.01;
		if(key_cud)	density -= 0.01;
			DEBUG_VAR( density, 	90);

		if(key_cur)	radius  += 0.01;
		if(key_cul)	radius  -= 0.01;
			DEBUG_VAR( radius, 		110);

		mTorch.skill1 = floatv(mouse_x);
		mTorch.skill2 = floatv(mouse_y);
		mTorch.skill3 = floatv(density);
		mTorch.skill4 = floatv(radius);

		if(key_pgup)	speed  += 0.01;
		if(key_pgdn)	speed  -= 0.01;
			DEBUG_VAR( speed, 		150);
		mTorch.skill8 = floatv(speed);

		wait(1);
	}
}




"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial