I assume you are having the pro version of 3dgs? Okey, then you have to do the following:

Include the following codes into your wdl file;
Code:

//Bloom Blur:
material mat_bloomblur {
effect = "

sampler2D g_samSrcColor;
float ds;
float xx;
float yy;
float4 Color;
float3 vecSkill41;

float4 MyShader( float2 Tex : TEXCOORD0 ) : COLOR0 {

float4 Color;Color = tex2D( g_samSrcColor, Tex.xy);
Color += tex2D( g_samSrcColor, Tex.xy+0.001);
Color += tex2D( g_samSrcColor, Tex.xy+0.002);
Color += tex2D( g_samSrcColor, Tex.xy+0.003);
Color = Color / 2;
return Color;
}

// Just one pass:
technique PostProcess {
pass p1 {
VertexShader = null;
PixelShader = compile ps_2_0 MyShader();
}
}
";
}



Code:

view GlowCamera
{
layer = -1;
flags = visible;

}



Code:

entity glow_quad_view
{
type = <glow.tga>; //= 1024 x 768 32bit
layer = 2; // display above view entities with layer 1
view = camera;// same camera parameters as the default view
// set the x position according to the texture size..
// x = 36; // for 32
// x = 72; // for 64
alpha = 100;
x = 880;//1550;//550; // for 128
y = 0; //center horzontally
z = 0; // and center vertically
scale_x = 1;//1; //.33;
scale_y =1;

}
//



Code:

starter map_glow()
{
var vartime =0.1;
var varrip = 9;
glow_quad_view.ambient=50;
glow_quad_view.transparent=on;
glow_quad_view.visible=on;
glow_quad_view.alpha=10;
glow_quad_view.nofog = 1;
//
Glow_quad_view.skill41 = float(0.05);
// Frequency:
Glow_quad_view.skill42 = float(9.0);
// Ripple offset:
Glow_quad_view.skill43 = float(vartime);//
glow_quad_view.material=[b]mat_bloomblur[/b];
GlowCamera.bmap=bmap_for_entity(glow_quad_view,0);

//
while(1)
{
proc_late();
GlowCamera.size_x=screen_size.x;
GlowCamera.size_y=screen_size.y;
vec_set(GlowCamera.x,camera.x);
vec_set(GlowCamera.pan,camera.pan);

Glow_quad_view.skill42 = float(varrip);
varrip+=0.5;
Glow_quad_view.skill43 = float(vartime);

wait(1);
}
}


You can add " GlowCamera.visible =on; " to your main script to start with the effect being active.
Code:

function toggle_glow
{
if(GlowCamera.visible)
{
GlowCamera.visible = off;
glow_quad_view.visible = off;
}
else
{
GlowCamera.visible = on;
glow_quad_view.visible = on;
}
}

on_1 = toggle_glow;



The bold part is what you have to set to the material you're using. The skills things are only used for the ripple and wobble shader by the way, so basically you could remove those lines.

Apart from this you need a (black) 1024x768 glow.tga for the render view quad.

I hope this helped you a bit,

In case you don't have the pro version, I'm looking into the possibilty of 'converting' these codes into something which can be used with Matt's render view dll. Haven't looked into that too much yet though,

Quote:

Btw, why didn't you contributed them in users contribution ??




Mmmm, I supose I can do that still, or would I get into trouble if I double post this there?

Cheers

Last edited by PHeMoX; 01/25/07 11:51.

PHeMoX, Innervision Software (c) 1995-2008

For more info visit: Innervision Software