A total of 10 (!) Post-Processing Shaders :)

Posted By: PHeMoX

A total of 10 (!) Post-Processing Shaders :) - 01/02/07 04:44

Since I haven't contributed that much lately, here are a few shaders that everyone could have made already, íf they owned the pro version ánd know how to search the web. (I am still a shader noob, trust me)

(Note: I have only changed some values here and there or added things, the real credits actually goes to 'Facewound' developer Garry Newman. His HLSL tutorial is awesome and very simple. No credits needed, free for use.)

I've got the following shaders:

Blur:



Code:

//Diagonal blur:
material mat_blur {
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 / 4;
return Color;
}

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



Bloom blur:


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();
}
}
";
}



Emboss:


Code:

//Emboss Test works:
material mat_emboss {
effect = "

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

float4 MyShader( float2 Tex : TEXCOORD0 ) : COLOR0 {

float4 Color;
Color.a = 1.0f;
Color.rgb = 0.5f;
Color -= tex2D( g_samSrcColor, Tex.xy-0.001)*2.0f;
Color += tex2D( g_samSrcColor, Tex.xy+0.001)*2.0f;
Color.rgb = (Color.r+Color.g+Color.b)/3.0f;
return Color;
}

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



Greyscale:


Code:

//Greyscale shader:
material mat_greyscale {
effect = "

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

float4 MyShader( float2 Tex : TEXCOORD0 ) : COLOR0 {

float4 Color;

Color.a = 1.0f;
Color = tex2D( g_samSrcColor, Tex.xy);
Color.rgb = (Color.r+Color.g+Color.b)/3.0f;
Color = Color *2;
return Color;
}

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



Sharpen:


Code:

// Sharpen Shader:
material mat_sharpen {
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.0001)*10.0f;
Color += tex2D( g_samSrcColor, Tex.xy-0.0001)*10.0f;
return Color;
}

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



Nightvision 1:


Code:

// Nightvision shader:
material mat_nvision {
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.g = Color.g*2;
return Color;
}

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



Nightvision 2:


Code:

//Nightvision 2 shader:
material mat_nvision2 {
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.b = Color.r*2;
Color.g = Color.b*2;

//Color.g = Color.r*2;
//Color.b = Color.g*2;
return Color;
}

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



Negative:


Code:

//Negative:
material mat_negative {
effect = "

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

float4 MyShader( float2 Tex : TEXCOORD0 ) : COLOR0 {

float4 Color;Color = 1-tex2D( g_samSrcColor, Tex.xy);
Color.a = 1.0f;
return Color;
}

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



And last but not least, a 'dizzyness' or 'breathing' shader. A screenshot won't show the effect, it's all about the camera motion.

Breath/dizzyness shader:
Code:

// Head wobble dizzyness shader:
material mat_wobble {
effect = "

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

float4 MyShader( float2 Tex : TEXCOORD0 ) : COLOR0 {

float4 Color;
Tex.y = Tex.y + (sin(vecSkill41.y)*0.01);
Tex.x = Tex.x + (cos(vecSkill41.z)*0.01);
Color = tex2D( g_samSrcColor, Tex.xy);
return Color;
}

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



---
The view I've defined;
Code:

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

}



The code I used to define a screen aligned quad;
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;

}
//


Next up, the starter function. (sorry, pretty messy, but should give you an idea about how I tried to change the code and stuff)
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=mat_emboss; // CHANGE THIS TO SHADER OF PREFERENCE!!
GlowCamera.bmap=bmap_for_entity(glow_quad_view,0);
//
// Amplitude:
//some_variable_related_to_time_to_make_it_ripple);

//
while(1)
{
proc_late();
// if(game_state){glow_quad_view.visible=on;}else{glow_quad_view.visible=off;}
GlowCamera.size_x=screen_size.x;
GlowCamera.size_y=screen_size.y;
vec_set(GlowCamera.x,camera.x);
vec_set(GlowCamera.pan,camera.pan);
//9.0
Glow_quad_view.skill42 = float(varrip);
varrip+=0.5;
Glow_quad_view.skill43 = float(vartime);
//vartime+=0.1;
//if(varrip>1){varrip=1;}
//if(vartime>0.5){vartime=0.1;}
//
wait(1);
}
}



As you may have guessed by now, I used parts of the glow shader code to get things quickly set up;
Code:

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

on_1 = toggle_glow;
on_2 = toggle_shadow;



That's all folks!

Tutorial link: Gary Newman's HLSL post-processing tutorial

Cheers
Posted By: adoado

Re: A total of 9 (!) Post-Processing Shaders :) - 01/02/07 07:17

Wow these are really good!! Thanks! I'll try them out soon

Nice work!

Adoado
Posted By: HeelX

Re: A total of 9 (!) Post-Processing Shaders :) - 01/02/07 07:26

Thank you!
Posted By: Captain_Kiyaku

Re: A total of 9 (!) Post-Processing Shaders :) - 01/02/07 07:30

is it possible to apply the negative shader only to a sprite or something, so only everything behind that "sprite" is negative?
Posted By: Matt_Coles

Re: A total of 9 (!) Post-Processing Shaders :) - 01/02/07 07:36

very nice, thanks phemox.
Now only if I could jump in time to two weeks when I purchase a6 pro for my uni course
Posted By: PHeMoX

Re: A total of 9 (!) Post-Processing Shaders :) - 01/02/07 08:25

Quote:

is it possible to apply the negative shader only to a sprite or something, so only everything behind that "sprite" is negative?




Yes, this is possible (not really on a sprite I think, don't think shaders will work on sprites, but you could make a one-sided model). Infact, it's quite easy to do so, there already is Oliver2s his refraction shader example out there (somewhere) using that method to distort things behind windows.

Anyways the only thing you basically need to change, is change the view entity into a real entity, give it the material and then you should be done already. I think everything else can pretty much be left as is, camera settings included.

Quote:

Now only if I could jump in time to two weeks when I purchase a6 pro for my uni course




I totally know what you mean, one of the main reasons I bought pro was the possibility to make post-processing shaders and realtime mirrors.

When you look at the code I've posted here, mostly it's color calculations, so it's really nothing complicated.

Things become really awesome when you combine stuff, like for example Ichiro's pucker shader thing and my nightvision 2 shader, shouldn't be to hard to figure that out.

Thanks for the comments guys, I hope this is useful,

Cheers
Posted By: Captain_Kiyaku

Re: A total of 9 (!) Post-Processing Shaders :) - 01/02/07 08:28

ok i will try it out later. thank you for the nice collection ^^.
Posted By: zazang

Re: A total of 9 (!) Post-Processing Shaders :) - 01/02/07 15:29

awesome collection..thanks Phemox !
One question though..Is it always supposed to be a blur bloom or there
could be a bloom without blur ?
Posted By: Pappenheimer

Re: A total of 9 (!) Post-Processing Shaders :) - 01/02/07 15:37

Quote:

thank you for the nice collection ^^.




Same here!
Nice especially, because theyare short. Guess, short means fast!?

Thanks a lot!
Posted By: PHeMoX

Re: A total of 9 (!) Post-Processing Shaders :) - 01/02/07 16:01

Quote:

Quote:

thank you for the nice collection ^^.




Same here!
Nice especially, because theyare short. Guess, short means fast!?

Thanks a lot!




You guys are all welcome and yes as far as I know these effects can't be written any shorter, I've got little to no drop of fps at all, it's fast indeed. (off course it is rendering a scene twice, so expect sóme fps loss, but it's very acceptable.)

Quote:

Is it always supposed to be a blur bloom or there
could be a bloom without blur ?




Well, I called it bloom blur because that's basically what it looks like. The mat_bloom_2 from Ichiro is probably a better example of real bloom, although that one blurs everything a bit too. Bloom is basically multiplying the lighter spots, I achieved that in the bloom blur by multiplying the blur code, so it's not that strange that it's bloom blur hehehe.

Cheers

Cheers
Posted By: Matt_Aufderheide

Re: A total of 9 (!) Post-Processing Shaders :) - 01/02/07 16:55

Bloom always incoporates blur as well.. this is how the effect works; otherwise it would just brighten things. The point is make it glow a bit.
Posted By: Ichiro

Re: A total of 9 (!) Post-Processing Shaders :) - 01/02/07 18:28

That's pretty sweet -- thanks for sharing. :)
Posted By: PHeMoX

Re: A total of 10 (!) Post-Processing Shaders :) - 01/02/07 19:04

Infact, I've got one more. Lol, having fun bigtime here.

I don't have 3D glasses, so I don't know if this shader actually gives the correct effect, but it does look a bit like what you need for it. If anyone could check it, I'd be grateful.

Well, here it comes;

3D Glasses shader:


Code:

// 3D glasses shader:
material mat_3Dglasses {
effect = "
sampler2D g_samSrcColor;

float ds;
float xx;
float yy;

float4 Color;
float3 vecSkill41;

const int NUM = 9;
const float threshold = 0.05; //0.05

const float2 c[9] = {float2(-0.0078125, 0.0078125),
float2( 0.00 , 0.0078125),
float2( 0.0078125, 0.0078125),
float2(-0.0078125, 0.00 ),
float2( 0.0, 0.0),
float2( 0.0078125, 0.007 ),
float2(-0.0078125,-0.0078125),
float2( 0.00 , -0.0078125),
float2( 0.0078125,-0.0078125),};


int i;

float4 MyShader( float2 Tex : TEXCOORD0 ) : COLOR0 {


for (i=0; i < NUM; i++) {
Color[i] = tex2D(g_samSrcColor, Tex.xy + c[i])*2;
}

return Color;
}

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

";
}



I'll see what else I can come up with. I have to say, it wasn't even my intention to make a 3D glasses shader, it just came out when I tried to get this shader to work:

Sobel Edge shader

I'd like to hear if this shader gives a 3D effect with 3D glasses,

Cheers
Posted By: zazang

Re: A total of 9 (!) Post-Processing Shaders :) - 01/03/07 10:37

okay bloom blur or bloom without blur...it looks nice I tried it
2 more questions come up though :-

1).Is there a way to clamp the white and black values to certain values after
the bloom effect has been applied ?.The reason is that it sometimes leads to
too much artificial brightness at some parts of the level.

2).I noticed a border around many entities,especially very clear around the terrain.The border was having the color of the background skycube.Is it the
effect of a probable glow shader integrated in it ?.Can it be avoided ?

Thanks so much !

regards
zazang
Posted By: PHeMoX

Re: A total of 10 (!) Post-Processing Shaders :) - 01/03/07 12:22

Hi there.

1.)Yes, I think there is a way. I will get back to you on this, after I finish getting a nice 'black and white' shader done, currently using just 2 colors doesn't quite look right.

You can do with colors basically whatever you like, I think the main solution to your problem is first tone down the overal brightness of the colors and áfter that apply the bloom blur. I promise i'll try to 'fix' this shader this afternoon.

2.)I will look into this too, although it seems to be present indeed, it's hardly noticable with my projects. Your projects are 1024x768 too?

Cheers
Posted By: ello

Re: A total of 10 (!) Post-Processing Shaders :) - 01/03/07 13:19

Quote:

Hi there.

1.)Yes, I think there is a way. I will get back to you on this, after I finish getting a nice 'black and white' shader done, currently using just 2 colors doesn't quite look right.




you could use a lookup-texture with a colorscale(or a greyscale) to get corresponding shades (by using tex1D(lookuptex, pixel); )
thus you can adjust the number of colors easily at low performancecost

i see you are having fun there:)
Posted By: PHeMoX

Re: A total of 10 (!) Post-Processing Shaders :) - 01/03/07 14:35

Thank you ello, I'll look into this approach!

Quote:

i see you are having fun there:)





Cheers
Posted By: zazang

Re: A total of 10 (!) Post-Processing Shaders :) - 01/04/07 02:01

Hi Phemox

Yes indeed even our project is 1024x768
and I'll wait(1) for an update on this code
Thanks !

regards
zazang
Posted By: William

Re: A total of 10 (!) Post-Processing Shaders :) - 01/04/07 03:29

Thanks for sharing.
Posted By: Scorpion

RE:3D Glasses shader - 01/04/07 12:42

i like your shaders really much, but the 3dglasses-shader don't work correct, i guess.
as far as i can see all red and blue "borders" have the same size, so there is no "optimal" 3d effect. so smaller the distance between these "borders", so more is it in the foreground.
Is it possible to make that with shaders?
Posted By: PHeMoX

Re: RE:3D Glasses shader - 01/04/07 12:56

The borders have to be the same size I think, because it's the overlap of colors that will change the size of the borders anyways. Still, I have been looking on the internet for some examples and found out that most use a way thicker border for each color, so perhaps the current effect won't work.

I have to say though, if I would make a 3D glasses shader from scratch, I would probably make 3 layers of the total scene, one layer in red, one in blue and one for example green and change their offset and add them together.

As soon as I get my hands on 3D glasses, I will change the code some more,

Cheers
Posted By: ello

Re: RE:3D Glasses shader - 01/04/07 13:15

for a real 3d-glass effect you'd need to take the depth information into account. the distance between the red and the blue extraction depends on the distance

btw, you may need a materialskill to define those colors, as there are red/green glasses, too
Posted By: PHeMoX

Re: RE:3D Glasses shader - 01/04/07 13:36

Quote:

for a real 3d-glass effect you'd need to take the depth information into account. the distance between the red and the blue extraction depends on the distance




Mmmm, okey, I wonder if this could be accomplished by using a fixed focal point in the center of the screen. At the moment I wouldn't really know how to change the thickness based on the position on screen, but if it needs the depth to even work. Maybe not quite worth it spending more time on this one?

Cheers
Posted By: ello

Re: RE:3D Glasses shader - 01/04/07 14:46

well, i think it is worth, as it is a great effect to have some more 3d-feeling. while reading the thing about a focal point , you could be right.. maybe you have to take both the focal point and the depth into account for proper calculations
Posted By: Rhuarc

Re: RE:3D Glasses shader - 01/04/07 15:43

Quote:

well, i think it is worth, as it is a great effect to have some more 3d-feeling. while reading the thing about a focal point , you could be right.. maybe you have to take both the focal point and the depth into account for proper calculations




Yes, both are neccesary, although it wouldn't be a focal point, but rather a focal range- which would just be a value of distance that the camera is focusing on. You could do this by rendering with a second camera and use an alternate shader to render every element with depth information, then use this texture as a mtlTex and then use the values as your offset thickness.

-Rhuarc
Posted By: PHeMoX

Re: RE:3D Glasses shader - 01/04/07 21:49

Lol! Okey, but before I could accomplish that I'd need to learn more HLSL. Still, this post-processing stuff is pretty cool.

Cheers
Posted By: Scorpion

Re: RE:3D Glasses shader - 01/04/07 22:55

if you would have for every object its own deep, are problems with big objekts like terrain or just the whole level. so i would say the only possible thing is to render 2 views on the screen (red+green)
Or is it possible to get the deep of every pixel?! *noobatshader*
Posted By: Ichiro

Re: RE:3D Glasses shader - 01/04/07 23:01

Or is it possible to get the deep of every pixel?!

I think Ello was talking about this, and I'd sure like to figure out how.
Posted By: lostclimate

Re: RE:3D Glasses shader - 01/05/07 02:57

well from discussions i've read on her about DOF you need whats called a depth map, it just tells you how far the pixel is away, so basically yeah thats what you'd need, the only problem is........... a6 users dont have access to it... so yeah as far as that goes were screwed
Posted By: ello

Re: RE:3D Glasses shader - 01/05/07 08:00

it is possible by using material events and for one view you only render the objexts with a greyscale depending on the depth.

this could look like:

Code:

struct VS_IN
{
float4 position : POSITION;
};

struct VS_OUT
{
float4 position : POSITION;
float depth : TEXCOORD0;
};

float front = 100;
float back = 300;


VS_OUT mainVS (VS_IN In)
{
VS_OUT Out;
Out.position = mul(In.position, matWorldViewProj);
Out.depth = ((Out.position.z - back)/1000) * ((Out.position.z - front)/1000);
return Out;
}

float4 mainPS (VS_OUT In) : COLOR0
{
return In.depth;
}

technique depth
{
pass p0
{
VertexShader = compile vs_2_0 mainVS();
PixelShader = compile ps_2_0 mainPS();
}
}



there may be other, better approaches of course
Posted By: sPlKe

Re: RE:3D Glasses shader - 01/25/07 11:28

ähnm.
call me dumb but...

how exactly do i apply the bloom blur shoader to my game?

sorry but im A not a coder and B never worked with any other shader than toon shader, wich is applied directly to the models...

and sicne that did not work im... well.. helpless...
Posted By: frazzle

Re: A total of 9 (!) Post-Processing Shaders :) - 01/25/07 11:46

Sorry for the late respons but I didn't notice this shader topic until now
Nice collection PHeMoX, to bad I don't own the pro version to run theses FF shaders
Btw, why didn't you contributed them in users contribution ??


Cheers

Frazzle
Posted By: PHeMoX

Re: RE:3D Glasses shader - 01/25/07 11:47

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
Posted By: frazzle

Re: RE:3D Glasses shader - 01/25/07 11:51

Quote:


I assume you are having the pro version of 3dgs?





No, look at Spike's specifications

Cheers

Frazzle
Posted By: sPlKe

Re: RE:3D Glasses shader - 01/25/07 12:07

its called profile;-)

no i just have the comercial version...

ANY bloom blur shader would be good...
Posted By: frazzle

Re: RE:3D Glasses shader - 01/26/07 20:07

Quote:

its called profile;-)

no i just have the comercial version...

ANY bloom blur shader would be good...




Lol, sorry sometimes I can be complicated
To comment your bloom and blur shader request, if you want good bloom and blur effects, this is only possible on the pro version. Their are some blur shaders that have a good effect but they have their limitations
Like this one from lostclimate on the wiki resource site:
blurry

Cheers

Frazzle
Posted By: Scorpion

Re: RE:3D Glasses shader - 08/29/07 18:19

I digged this thread out and try to get this work...but i already don'T get the view-entity visible, any help? (lite-c)
Posted By: Uhrwerk

Re: RE:3D Glasses shader - 08/29/07 18:34

falgs = VISIBLE; flags2 = VISIBLE;
Posted By: Scorpion

Re: RE:3D Glasses shader - 08/29/07 18:37

did that. with normal models it works, but not if i load a picture.
So i'll just make an flat model and skin it...
Posted By: Uhrwerk

Re: RE:3D Glasses shader - 08/29/07 18:46

Wasn't a problem for me. I just tried it. Did you take a 32 bit tga file with an alpha channel?
Posted By: openfire2691

RE:3D Glasses shader - 08/29/07 18:51

A 3D Glasses effect really shouldn't be that difficult. All you need to do is set up two different cameras and position them next to each other. Give one a green tint and the other a red tint and overlay them. This works because the two cameras are positioned just like your eyes are, so they would act the same way, getting slightly different angles of objects and returning the illusion of three dimensions.
Posted By: Scorpion

Re: RE:3D Glasses shader - 08/29/07 18:51

hey, with alphachanel it works, thank you really much (did i over read that in the thread? O_ò)
Posted By: Uhrwerk

Re: RE:3D Glasses shader - 08/29/07 20:02

You're welcome. I had problems with this myself. Found it somewhere in this thread in a comment to a script...
Posted By: MrCode

Re: RE:3D Glasses shader - 08/29/07 22:10

How do I use the negative shader (in Lite-C)? I have the code copied and edited (material changed to MATERIAL*), but I don't know how to get it to apply to the camera.
Posted By: Uhrwerk

Re: RE:3D Glasses shader - 08/29/07 23:18

Have a look some posts above. Phemox explained it all in detail. The changes for Lite-C are minimal.
Posted By: openfire2691

Re: A total of 10 (!) Post-Processing Shaders :) - 08/29/07 23:58

I tried to use one of the shaders in this post, but when I run it I get an error saying that it doesn't recognize "sampler2D g_samSrcColor" as an actual command. I think this is because the engine is not recognizing that all of that is written in a different language. Is there a reason for that? I'm running 3DGS Pro, so there shouldn't be any conflict.
Posted By: PHeMoX

Re: A total of 10 (!) Post-Processing Shaders :) - 08/30/07 00:04

Quote:

I tried to use one of the shaders in this post, but when I run it I get an error saying that it doesn't recognize "sampler2D g_samSrcColor" as an actual command. I think this is because the engine is not recognizing that all of that is written in a different language. Is there a reason for that? I'm running 3DGS Pro, so there shouldn't be any conflict.




The reason would be that you need at least A6.31, the 'sampler2D' command is still working fine here (with A6.60). Or ... perhaps you've missed a semicolon somewhere? Did you copied and pasted?

Cheers
Posted By: MrCode

Re: A total of 10 (!) Post-Processing Shaders :) - 08/30/07 04:46

@Uhrwerk:

Oh, wait a minute, nvr mind. I only have the Lite-C free version. No shader FX. I don't want to test it with my A6, though. I'm kinda moving away from C-Script.

I hope to get A7 sometime soon, though!
Posted By: Scorpion

Re: A total of 10 (!) Post-Processing Shaders :) - 08/30/07 12:08

there is still the old render_view.dll, but it was really slow.
I think in this forum there was someone who wanted to write a new, better one.
Posted By: openfire2691

Re: A total of 10 (!) Post-Processing Shaders :) - 08/31/07 16:19

Thanks Phemox. Shaders work great now.
© 2024 lite-C Forums