The unofficial BSNES pixel shader thread
-
- Regular
- Posts: 347
- Joined: Tue Mar 07, 2006 10:32 am
- Location: The Netherlands
Hheheh, found something super cool:
http://boris-vorontsov.narod.ru/index_en.html
A Russian is using the same idea as I (hooking D3D calls and reprocessing frames), but he has done it for specific games. Which is certainly cool, as he made depth of field effects and SSAO (screenspace ambience occlusion) shaders. He also made a DLL that wraps D3D8 to D3D9, which is super cool for old games.
Just thought of pointing it out, as making mods for specific games, is really cool, and it works rather well...
http://boris-vorontsov.narod.ru/index_en.html
A Russian is using the same idea as I (hooking D3D calls and reprocessing frames), but he has done it for specific games. Which is certainly cool, as he made depth of field effects and SSAO (screenspace ambience occlusion) shaders. He also made a DLL that wraps D3D8 to D3D9, which is super cool for old games.
Just thought of pointing it out, as making mods for specific games, is really cool, and it works rather well...
Although it looks 10x more realistic it also looks very blurrymudlord wrote:Hheheh, found something super cool:
http://boris-vorontsov.narod.ru/index_en.html
A Russian is using the same idea as I (hooking D3D calls and reprocessing frames), but he has done it for specific games. Which is certainly cool, as he made depth of field effects and SSAO (screenspace ambience occlusion) shaders. He also made a DLL that wraps D3D8 to D3D9, which is super cool for old games.
Just thought of pointing it out, as making mods for specific games, is really cool, and it works rather well...
Awesomely done though
Learning Shaders
I'm learning shaders by editing the presets, reading tutorials, and mostly screwing with the math since that's the easiest place to start.
So anyway, here is the first shader I'm actually keeping that I modded from the Red color shader. It achieves a red/blue effect I'm a fan of.
http://www.savefile.com/files/1760510
Shader Download
Shader Code (Simple Edit but learning takes time, right? Plus I love those colors together like that, I've used them that way in many things and screwing around with the math I was shocked to come upon them.)
http://i36.tinypic.com/10qjd6s.png SM64 in PJ64 with Rice/Mudlord 613 DX9
http://i37.tinypic.com/if350g.png ZAMN Intro BSNES
http://i37.tinypic.com/x1avjb.png ZAMN in-game BSNES
http://i35.tinypic.com/2drvshs.png DKC2 in-game BSNES
Super Mario 64. Haven't tried BSNES yet, though results should be obvious. No longer true. See ZAMN examples. +DKC2 cause it looks beautiful. All BSNES Scale2x Linear.
Hope sharing this isn't too off-topic.
So anyway, here is the first shader I'm actually keeping that I modded from the Red color shader. It achieves a red/blue effect I'm a fan of.
http://www.savefile.com/files/1760510
Shader Download
Code: Select all
//These variables will get set automatically
texture tex1;
float2 rcpres;
sampler s0 = sampler_state { texture = <tex1>; };
float4 NormalColourPass( in float2 Tex : TEXCOORD0 ) : COLOR0
{
float4 color = tex2D( s0, Tex );
color.a = 1;
return color;
}
float4 DiffColourPass( in float2 Tex : TEXCOORD0 ) : COLOR0
{
float4 color = tex2D( s0, Tex.xy);
color.gb = color.r+color.g-color.b;
color.r = color.r/3+color.a/5;
return color;
}
Technique T0
{
pass p0 { PixelShader = compile ps_2_0 NormalColourPass(); }
pass p1 { PixelShader = compile ps_2_0 DiffColourPass(); }
}
http://i36.tinypic.com/10qjd6s.png SM64 in PJ64 with Rice/Mudlord 613 DX9
http://i37.tinypic.com/if350g.png ZAMN Intro BSNES
http://i37.tinypic.com/x1avjb.png ZAMN in-game BSNES
http://i35.tinypic.com/2drvshs.png DKC2 in-game BSNES
Super Mario 64. Haven't tried BSNES yet, though results should be obvious. No longer true. See ZAMN examples. +DKC2 cause it looks beautiful. All BSNES Scale2x Linear.
Hope sharing this isn't too off-topic.
Code: Select all
//These variables will get set automatically
texture tex1;
float2 rcpres;
sampler s0 = sampler_state { texture = <tex1>; };
float4 NormalColourPass( in float2 Tex : TEXCOORD0 ) : COLOR0
{
float4 color = tex2D( s0, Tex );
color.a = 1;
return color;
}
float4 RChannel( in float2 Tex : TEXCOORD0 ) : COLOR0
{
float4 color = tex2D( s0, Tex.xy);
color.r = color.r - color.gb;
color.gb = color.r;
return color;
}
float4 GChannel( in float2 Tex : TEXCOORD0 ) : COLOR0
{
float4 color = tex2D( s0, Tex.xy);
color.g = color.g - color.rb;
color.rb = color.g;
return color;
}
float4 BChannel( in float2 Tex : TEXCOORD0 ) : COLOR0
{
float4 color = tex2D( s0, Tex.xy);
color.b = color.b - color.rg;
color.rg = color.b;
return color;
}
Technique T0
{
pass p0 { PixelShader = compile ps_2_0 NormalColourPass(); }
pass p1 { PixelShader = compile ps_2_0 RChannel(); }
pass p2 { PixelShader = compile ps_2_0 GChannel(); }
pass p3 { PixelShader = compile ps_2_0 BChannel(); }
}
EDIT;
At the moment I'm trying to separate the "channels" (rgba) into "layers".
I've sort of managed to do it with two samplers and textures, where s1 renders into s0, but actually more or less renders its effects over s0 and its rendered effects. i.e. s0 says red is green, but s1 says red is blue, so in the final render, red is blue. Not red is green so red(green) is blue. I'm also experimenting with removing a "channel" on a "layer", but I'm not much sucessful, and in some situations the above problems seems inverted (red IS green, so red(green) IS blue, i.e. color.r = -color.r on s1 removes the red "channel" in the entire final render, not just s1.)
Code: Select all
float4 NormalColourPass( in float2 Tex : TEXCOORD0 ) : COLOR0
{
float4 color = tex2D( s0, Tex );
color.a = 1;
color.gb = color.r/6;
return color;
}
But I'm clueless to most of this language and Google isn't helping I'm afraid, so most of what I'm saying is based on rigorous testing and uh, guessing. So it's likely to be complete erroneous gibberish.
Any input totally welcome! Really!
EDIT;
OT; Why is the patcher so.. risque? Any chance of a clean version, I mean I can't complain but, I don't want anyone to get the wrong idea of what I'm doing on the computer.

EDITEDITEDIT; Sorry for mega-post.
Code: Select all
sampler s0 : register(s0);
float4 p0 : register(c0);
float4 p1 : register(c1);
#define width (p0[0])
#define height (p0[1])
#define counter (p0[2])
#define clock (p0[3])
#define one_over_width (p1[0])
#define one_over_height (p1[1])
#define PI acos(-1)
float4 main(float2 tex : TEXCOORD0) : COLOR
{
// - this is a very simple raytracer, one sphere only
// - no reflection or refraction, yet (my ati 9800 has a 64 + 32 instruction limit...)
float3 pl = float3(3,-3,-4); // light pos
float4 cl = 0.4; // light color
float3 pc = float3(0,0,-1); // cam pos
float3 ps = float3(0,0,0.5); // sphere pos
float r = 0.65; // sphere radius
float3 pd = normalize(float3(tex.x-0.5, tex.y-0.5, 0) - pc);
float A = 1;
float B = 2*dot(pd, pc - ps);
float C = dot(pc - ps, pc - ps) - r*r;
float D = B*B - 4*A*C;
float4 c0 = 0;
if(D >= 0)
{
// t2 is the smaller, obviously...
// float t1 = (-B + sqrt(D)) / (2*A);
// float t2 = (-B - sqrt(D)) / (2*A);
// float t = min(t1, t2);
float t = (-B - sqrt(D)) / (2*A);
// intersection data
float3 p = pc + pd*t;
float3 n = normalize(p - ps);
float3 l = normalize(pl - p);
// mapping the image onto the sphere
tex = acos(-n)/PI;
// rotate it
tex.x = frac(tex.x + frac(clock/10));
// diffuse + specular
c0 = tex2D(s0, tex) * dot(n, l) + cl * pow(max(dot(l, reflect(pd, n)), 0), 50);
}
return c0;
}
Technique T0
{
pass p0 { PixelShader = compile ps_2_0 main(); }
}
Sorry for second post but that one there was getting out of hand, I thought a fresh result deserves a fresh post.
Anyway,
Results; http://i36.tinypic.com/2ziydeg.png
I think the code is probably redundant, but I'm too tired to check it, otherwise I think this is just a result of over-brightness. It makes the invisible areas semi-visible, but the visible areas dramatically bright.
Perhaps its a step in the right direction towards my goal, though.
EDIT; original effect that led to this interest (comment out diffcolourpass section for testing)
http://i38.tinypic.com/2unxzx2.png
http://i38.tinypic.com/ehi5ty.png
http://i33.tinypic.com/333zyfc.png
EDIT; LTTP tests on ver1 (hard-red, not overbright) seem better than ZAMN. Did DKC2 but no screens, was too busy playing/having eyes burnt out.
http://i38.tinypic.com/2la99i8.png
http://i38.tinypic.com/34hi7o0.png
EDIT; Planet Claire
http://i33.tinypic.com/zursba.png
Place into red color filter etc, trying to trim to only the changed code.
Gonna release a pack of filters though eventually, sorting out ones that are eh for ones that I like. Only colors for now though.
EDITEDITEDIT; http://i33.tinypic.com/10roagx.png DKC2.
Preliminary FX Pack
(tested a while before finishing this post edit.. and made some, etc.)
http://www.savefile.com/files/1762124
EDIT; Not included in pack, just made it. SMELLS LIKE STEREOSCOPY!
Based on Blur I. Thanks!
Fake Stereoscopic look. Doesn't always work but kinda cute idea.
http://i36.tinypic.com/2m5jfjd.png LTTP 1
http://i34.tinypic.com/24lizcg.png LTTP 2
http://i37.tinypic.com/10opt94.png ZAMN 1
http://i33.tinypic.com/az8dtu.png ZAMN 2 (Zeke has the technology!)
http://i35.tinypic.com/25poj8l.png ZAMN 3 (See what I mean about not always working?)
EDIT50000000000000; Updated pack.
http://www.savefile.com/files/1762329
Includes;
RedAndX (Three Variants)
GreenAndX (Three Variants)
BlueAndX (Three Variants)
Black and White from "Channel" (R,G,B, and Other Test Subject.)
Faded
Tints;
R, G, and B Shaders
-R, -G, and -B Shaders (- meaning Absence of instead of only.)
-R, -G, and -B Shaders w/ Invert (no red, green is blue and blue is green, etc.)
R shaders with slight G and B restoration. Variants.
"Planet Claire" shader. Variants.
Smells Stereoscopic!
I had lots of fun with this.
And two oversized posts.
Time to get moderator edited
Moderator edit: wish granted. now back to work you slimy maggot.
^--- http://i34.tinypic.com/2cwsjfa.png
NTSC filter with interpolation and stero-fake-mexican shader.
Is this work?
Anyway,
Code: Select all
//These variables will get set automatically
texture tex1;
texture tex2;
float2 rcpres;
sampler s0 = sampler_state { texture = <tex1>; };
sampler s1 = sampler_state { texture = <tex2>; };
float4 NormalColourPass( in float2 Tex : TEXCOORD0 ) : COLOR0
{
float4 color = tex2D( s0, Tex );
color.a = 1;
color.gb = color.r/6;
return color;
}
float4 DiffColourPass( in float2 Tex : TEXCOORD0 ) : COLOR0
{
float4 color = tex2D( s1, Tex.xy);
color.a = 0.5;
color.gb = color.gb*6;
color.r = color.r*6;
return color;
}
Technique T0
{
pass p0 { PixelShader = compile ps_2_0 NormalColourPass(); }
pass p1 { PixelShader = compile ps_2_0 DiffColourPass(); }
}
I think the code is probably redundant, but I'm too tired to check it, otherwise I think this is just a result of over-brightness. It makes the invisible areas semi-visible, but the visible areas dramatically bright.
Perhaps its a step in the right direction towards my goal, though.
EDIT; original effect that led to this interest (comment out diffcolourpass section for testing)
http://i38.tinypic.com/2unxzx2.png
http://i38.tinypic.com/ehi5ty.png
http://i33.tinypic.com/333zyfc.png
EDIT; LTTP tests on ver1 (hard-red, not overbright) seem better than ZAMN. Did DKC2 but no screens, was too busy playing/having eyes burnt out.
http://i38.tinypic.com/2la99i8.png
http://i38.tinypic.com/34hi7o0.png
EDIT; Planet Claire

http://i33.tinypic.com/zursba.png
Code: Select all
...
float4 DiffColourPass( in float2 Tex : TEXCOORD0 ) : COLOR0
{
float4 color = tex2D( s0, Tex.xy);
color.rgb = color.gba/2;
return color;
}
...
Gonna release a pack of filters though eventually, sorting out ones that are eh for ones that I like. Only colors for now though.
EDITEDITEDIT; http://i33.tinypic.com/10roagx.png DKC2.
Preliminary FX Pack
(tested a while before finishing this post edit.. and made some, etc.)
http://www.savefile.com/files/1762124
EDIT; Not included in pack, just made it. SMELLS LIKE STEREOSCOPY!
Code: Select all
//These variables will get set automatically
texture tex1;
float2 rcpres;
sampler s0 = sampler_state { texture = <tex1>; };
float4 NormalColourPass( in float2 Tex : TEXCOORD0 ) : COLOR0
{
float4 color = tex2D( s0, Tex );
color.a = 1;
return color;
}
float4 BlurPass( in float2 Tex : TEXCOORD0 ) : COLOR0
{
float4 Color = tex2D( s0, Tex.xy );
//Color.r += tex2D( s0, Tex.xy+01.001)*2*2;
//Color.r += tex2D( s0, Tex.xy+01.002)*4*2;
Color.r += tex2D( s0, Tex.xy+01.003)*6*2;
Color.r = (Color.r / 15);
//Color.b -= tex2D( s0, Tex.xy+01.001)*2*2;
//Color.b -= tex2D( s0, Tex.xy+01.002)*4*2;
Color.b -= tex2D( s0, Tex.xy+01.003)*6*2;
Color.b = (Color.b * 15);
Color.g = Color.g;
return Color;
}
Technique T0
{
pass p0 { PixelShader = compile ps_2_0 NormalColourPass(); }
pass p1 { PixelShader = compile ps_2_0 BlurPass(); }
}
Fake Stereoscopic look. Doesn't always work but kinda cute idea.
http://i36.tinypic.com/2m5jfjd.png LTTP 1
http://i34.tinypic.com/24lizcg.png LTTP 2
http://i37.tinypic.com/10opt94.png ZAMN 1
http://i33.tinypic.com/az8dtu.png ZAMN 2 (Zeke has the technology!)
http://i35.tinypic.com/25poj8l.png ZAMN 3 (See what I mean about not always working?)
EDIT50000000000000; Updated pack.
http://www.savefile.com/files/1762329
Includes;
RedAndX (Three Variants)
GreenAndX (Three Variants)
BlueAndX (Three Variants)
Black and White from "Channel" (R,G,B, and Other Test Subject.)
Faded
Tints;
R, G, and B Shaders
-R, -G, and -B Shaders (- meaning Absence of instead of only.)
-R, -G, and -B Shaders w/ Invert (no red, green is blue and blue is green, etc.)
R shaders with slight G and B restoration. Variants.
"Planet Claire" shader. Variants.
Smells Stereoscopic!
I had lots of fun with this.
And two oversized posts.
Time to get moderator edited

Moderator edit: wish granted. now back to work you slimy maggot.
^--- http://i34.tinypic.com/2cwsjfa.png
NTSC filter with interpolation and stero-fake-mexican shader.
Is this work?
gj board filter.
Latest pack update.
Smallest and last post for a while.
http://www.savefile.com/files/1763411

Latest pack update.
Smallest and last post for a while.
http://www.savefile.com/files/1763411
Because I felt like it.OT; Why is the patcher so.. risque? Any chance of a clean version, I mean I can't complain but, I don't want anyone to get the wrong idea of what I'm doing on the computer.

If it really offends your mother/girlfriend/wife/grandparents, I will make a clean version. Sorry bout that.
It's fine, coder's choice. Can't make you sorry for things you gave me for freemudlord wrote:Because I felt like it.OT; Why is the patcher so.. risque? Any chance of a clean version, I mean I can't complain but, I don't want anyone to get the wrong idea of what I'm doing on the computer.![]()
If it really offends your mother/girlfriend/wife/grandparents, I will make a clean version. Sorry bout that.

Modified the regular toon shader, I like how it makes OOT look.
Find and make x line look like so in toon shader.
Presto
sm64 preview
http://i34.tinypic.com/2iqbo1i.png
edit; magical.
http://www.savefile.com/files/1794302
Find and make x line look like so in toon shader.
Code: Select all
...
float edge =(x*x + y*y < threshold)? 2.0:1.5;
...
sm64 preview
http://i34.tinypic.com/2iqbo1i.png
edit; magical.
http://www.savefile.com/files/1794302
Indescribable. Also somewhat animated.
Moving Emboss
edit2;
My new blur shader.
or to colored pencilize ^
Code: Select all
//These variables will get set automatically
texture tex1;
float2 rcpres;
float Timer;
sampler s0 = sampler_state { texture = <tex1>; };
float4 Pass0( in float2 Tex : TEXCOORD0 ) : COLOR0
{
float4 Color = tex2D( s0, Tex.xy );
return Color;
}
float4 Pass1( in float2 Tex : TEXCOORD0 ) : COLOR0
{
float4 Color = tex2D( s0, Tex.xy );
Color -= sin(Color*10);
Color += tex2D( s0, Tex.xy+0.0025 );
return Color/2 + (sin(Timer*35))/10;
}
Technique T0
{
pass p0 { PixelShader = compile ps_2_0 Pass0(); }
pass p0 { PixelShader = compile ps_2_0 Pass1(); }
}
Code: Select all
//These variables will get set automatically
texture tex1;
float2 rcpres;
float Timer;
sampler s0 = sampler_state { texture = <tex1>; };
float4 Pass0( in float2 Tex : TEXCOORD0 ) : COLOR0
{
float4 Color = tex2D( s0, Tex.xy );
return Color;
}
float4 Pass1( in float2 Tex : TEXCOORD0 ) : COLOR0
{
float4 Color = tex2D( s0, Tex.xy );
Color.rgb += tex2D( s0, Tex.xy+(sin(Timer*35)/350) );
Color.rgb += -tex2D( s0, Tex.xy-(sin(Timer*35)/350) );
return Color*1.5;
}
Technique T0
{
pass p0 { PixelShader = compile ps_2_0 Pass0(); }
pass p0 { PixelShader = compile ps_2_0 Pass1(); }
}
edit2;
Code: Select all
//These variables will get set automatically
texture tex1;
float2 rcpres;
float Timer;
sampler s0 = sampler_state { texture = <tex1>; };
float4 Pass0( in float2 Tex : TEXCOORD0 ) : COLOR0
{
float4 Color = tex2D( s0, Tex.xy );
return Color;
}
float4 Pass1( in float2 Tex : TEXCOORD0 ) : COLOR0
{
float4 Color = tex2D( s0, Tex.xy );
Color = tex2D( s0, Tex.xy );
return ((Color*2)*(tex2D( s0, Tex.xy-(0.0015+sin(Timer*25)/750) ) + tex2D( s0, Tex.xy+(0.0015+sin(Timer*25)/750) ))) + (tex2D( s0, Tex.xy ))/4;
}
Technique T0
{
pass p0 { PixelShader = compile ps_2_0 Pass0(); }
pass p0 { PixelShader = compile ps_2_0 Pass1(); }
}
Code: Select all
float4 Pass1( in float2 Tex : TEXCOORD0 ) : COLOR0
{
float4 Color = tex2D( s0, Tex.xy );
Color = tex2D( s0, Tex.xy );
return ((Color*2)/(tex2D( s0, Tex.xy-(0.0020) ) + tex2D( s0, Tex.xy+(0.0020) ))) + (tex2D( s0, Tex.xy ))/4;
}
-
- Regular
- Posts: 347
- Joined: Tue Mar 07, 2006 10:32 am
- Location: The Netherlands
Code: Select all
//These variables will get set automatically
texture tex1;
float2 rcpres;
float Timer;
sampler s0 = sampler_state { texture = <tex1>; };
float4 Pass0( in float2 Tex : TEXCOORD0 ) : COLOR0
{
float4 Color = tex2D( s0, Tex.xy );
return Color;
}
float4 Pass1( in float2 Tex : TEXCOORD0 ) : COLOR0
{
float4 Color = tex2D( s0, Tex.xy );
Color = tex2D( s0, Tex.xy );
Color.a += (-Color.rgb*2) + (Color.rgb/1.5);
return ((Color*2)/(tex2D( s0, Tex.xy-(0.0020) ) + tex2D( s0, Tex.xy+(0.0020) ))) + (tex2D( s0, Tex.xy ))/4;
}
Technique T0
{
pass p0 { PixelShader = compile ps_2_0 Pass0(); }
pass p0 { PixelShader = compile ps_2_0 Pass1(); }
}
Effect varies between games/systems and trying different filters is encouraged with all shaders.

http://i34.tinypic.com/11m6wxz.png
HI CONTRAST
Code: Select all
//These variables will get set automatically
texture tex1;
float2 rcpres;
float Timer;
sampler s0 = sampler_state { texture = <tex1>; };
float4 Pass0( in float2 Tex : TEXCOORD0 ) : COLOR0
{
float4 Color = tex2D( s0, Tex.xy );
return Color;
}
float4 Pass1( in float2 Tex : TEXCOORD0 ) : COLOR0
{
float4 Color = tex2D( s0, Tex.xy );
Color = tex2D( s0, Tex.xy );
Color.a += (-Color.rgb*2) + (Color.rgb/1.5);
Color.rgb -= Color.a/2;
return ((Color*2)/(tex2D( s0, Tex.xy-(0.0020) ) + tex2D( s0, Tex.xy+(0.0020) ))) + (tex2D( s0, Tex.xy ))/4;
}
Technique T0
{
pass p0 { PixelShader = compile ps_2_0 Pass0(); }
pass p0 { PixelShader = compile ps_2_0 Pass1(); }
}

Code: Select all
//These variables will get set automatically
texture tex1;
texture tex2;
float2 rcpres;
float Timer;
sampler s0 = sampler_state { texture = <tex1>; };
sampler s1 = sampler_state { texture = <tex2>; };
float4 Pass0( in float2 Tex : TEXCOORD0 ) : COLOR0
{
float4 Color = tex2D( s0, Tex.xy );
float4 Colrx = tex2D( s1, Tex.xy );
return Color;
return Colrx;
}
float4 Pass1( in float2 Tex : TEXCOORD0 ) : COLOR0
{
float4 Color = tex2D( s0, Tex.xy );
float4 Colrx = tex2D( s1, Tex.xy );
Colrx.rg = Colrx.gb+sin(Timer*25)/25;
Colrx.gb = Colrx.gr+sin(Timer*25)/25;
Colrx.br = Colrx.bg+sin(Timer*25)/25;
return (Colrx *= (Color *= tex2D( s0, Tex.xy+0.0020 )))/(sin(Tex.x*25+Tex.y*25)/300);
}
Technique T0
{
pass p0 { PixelShader = compile ps_2_0 Pass0(); }
pass p0 { PixelShader = compile ps_2_0 Pass1(); }
}
Code: Select all
//These variables will get set automatically
texture tex1;
texture tex2;
float2 rcpres;
float Timer;
sampler s0 = sampler_state { texture = <tex1>; };
sampler s1 = sampler_state { texture = <tex2>; };
float4 Pass0( in float2 Tex : TEXCOORD0 ) : COLOR0
{
float4 Color = tex2D( s0, Tex.xy );
float4 Colrx = tex2D( s1, Tex.xy );
return Color;
return Colrx;
}
float4 Pass1( in float2 Tex : TEXCOORD0 ) : COLOR0
{
float4 Color = tex2D( s0, Tex.xy );
float4 Colrx = tex2D( s1, Tex.xy );
Color += (Colrx *= Color);
Colrx -= (Color /= Colrx);
return ((tan(Colrx) * tan(Color))/2) + (Colrx + Color);
}
Technique T0
{
pass p0 { PixelShader = compile ps_2_0 Pass0(); }
pass p0 { PixelShader = compile ps_2_0 Pass1(); }
}
gllt your shaders are awesome.
i wonder would you be able to make this?:
http://security-emulation.blogspot.com/ ... ation.html
i wonder would you be able to make this?:
http://security-emulation.blogspot.com/ ... ation.html
Considering my shaders are experimentation-discovered and I can't find a decent guide that can direct me to a wider range of functions, it would be lucky.tetsuo55 wrote:gllt your shaders are awesome.
i wonder would you be able to make this?:
http://security-emulation.blogspot.com/ ... ation.html
But not impossible! [/determination]
EVERY GAME IS KILL BILL/MCDONALDS


Code: Select all
//These variables will get set automatically
texture tex1;
texture tex2;
float2 rcpres;
//float Timer;
sampler s0 = sampler_state { texture = <tex1>; };
sampler s1 = sampler_state { texture = <tex2>; };
float4 Pass0( in float2 Tex : TEXCOORD0 ) : COLOR0
{
float4 Color = tex2D( s0, Tex.xy );
float4 Colrx = tex2D( s1, Tex.xy );
return Color;
return Colrx;
}
float4 Pass1( in float2 Tex : TEXCOORD0 ) : COLOR0
{
float4 Color = tex2D( s0, Tex.xy );
float4 Colrx = tex2D( s1, Tex.xy );
Color.rgb = Colrx.arg / Color.bar / Colrx.gba;
return Color * Colrx;
}
Technique T0
{
pass p0 { PixelShader = compile ps_2_0 Pass0(); }
pass p0 { PixelShader = compile ps_2_0 Pass1(); }
}