The unofficial BSNES pixel shader thread

Anything else related to bsnes goes there.
Locked
Verdauga Greeneyes
Regular
Posts: 347
Joined: Tue Mar 07, 2006 10:32 am
Location: The Netherlands

Post by Verdauga Greeneyes »

I was gonna work on it tonight, but then I took my parents to see The Dark Knight <.< Might still get something done though.
mudlord
has wat u liek
Posts: 559
Joined: Tue Sep 11, 2007 2:54 pm
Location: Banland.

Post by mudlord »

i think the entire thing, apart from the stretch to 800x600 part can be done with math alone.
Even a shader implementation of blargg's NTSC emulator can be done, I know the author of pSX managed to do it, with some help from some coefficient textures and with it being a multipass shader...
mudlord
has wat u liek
Posts: 559
Joined: Tue Sep 11, 2007 2:54 pm
Location: Banland.

Post by mudlord »

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...
I.S.T.
Zealot
Posts: 1325
Joined: Tue Nov 27, 2007 7:03 am

Post by I.S.T. »

What is with you damn Europeans and your monopoly on crazy coding skills?!
tetsuo55
Regular
Posts: 307
Joined: Sat Mar 04, 2006 3:17 pm

Post by tetsuo55 »

mudlord 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...
Although it looks 10x more realistic it also looks very blurry

Awesomely done though
funkyass
"God"
Posts: 1128
Joined: Tue Jul 27, 2004 11:24 pm

Post by funkyass »

dude went overboard with compression on some photos, thats for sure.

but the fact you can tell the difference with the compression that high...
Does [Kevin] Smith masturbate with steel wool too?

- Yes, but don’t change the subject.
mudlord
has wat u liek
Posts: 559
Joined: Tue Sep 11, 2007 2:54 pm
Location: Banland.

Post by mudlord »

Although it looks 10x more realistic it also looks very blurry

Awesomely done though
And thats what SSAO is designed for: Realism in lighting.
gllt
NO VOWELS >:[
Posts: 753
Joined: Sun Aug 31, 2008 12:59 pm
Location: ALABAMA
Contact:

Learning Shaders

Post by gllt »

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

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

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.
mudlord
has wat u liek
Posts: 559
Joined: Tue Sep 11, 2007 2:54 pm
Location: Banland.

Post by mudlord »

Nah, isnt off topic at all.

Sharing shaders is intended and encouraged, so what you are doing is great! :)

I'll check out the shader and fix the DL link when I have a chance.
gllt
NO VOWELS >:[
Posts: 753
Joined: Sun Aug 31, 2008 12:59 pm
Location: ALABAMA
Contact:

Post by gllt »

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(); }
}
That should separate the "channels", but I don't know how to re-blend them. Could be useful.

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;
}

Produces a red-only somewhat filter. Reminded me of virtual boy at first, but causes some problems. In Zombies Ate My Neighbors, the green hedges are black like the grass is also made black, so therefore INVISIBLE. Now, if I could under/overlay the green and blue channels again in a red tint that is dimmer than in the other layer, I could restore the visibility and improve the effect, but this is where I'm halted.

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. :P

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

Trying to convert tex to sphere render code from media player classic shaders (i.e. this is not my code, all I did was add the pass p0 command. So far it's rendering the texture back, but to a canvas, not a rotating sphere.)
gllt
NO VOWELS >:[
Posts: 753
Joined: Sun Aug 31, 2008 12:59 pm
Location: ALABAMA
Contact:

Post by gllt »

Sorry for second post but that one there was getting out of hand, I thought a fresh result deserves a fresh post.

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

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 :P
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;
}
...
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!

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

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?
gllt
NO VOWELS >:[
Posts: 753
Joined: Sun Aug 31, 2008 12:59 pm
Location: ALABAMA
Contact:

Post by gllt »

gj board filter. :wink:

Latest pack update.

Smallest and last post for a while.

http://www.savefile.com/files/1763411
mudlord
has wat u liek
Posts: 559
Joined: Tue Sep 11, 2007 2:54 pm
Location: Banland.

Post by mudlord »

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.
Because I felt like it. :lol:

If it really offends your mother/girlfriend/wife/grandparents, I will make a clean version. Sorry bout that.
gllt
NO VOWELS >:[
Posts: 753
Joined: Sun Aug 31, 2008 12:59 pm
Location: ALABAMA
Contact:

Post by gllt »

mudlord wrote:
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.
Because I felt like it. :lol:

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 free 8)
gllt
NO VOWELS >:[
Posts: 753
Joined: Sun Aug 31, 2008 12:59 pm
Location: ALABAMA
Contact:

Post by gllt »

Modified the regular toon shader, I like how it makes OOT look.
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;
...
Presto

sm64 preview
http://i34.tinypic.com/2iqbo1i.png


edit; magical.

http://www.savefile.com/files/1794302
gllt
NO VOWELS >:[
Posts: 753
Joined: Sun Aug 31, 2008 12:59 pm
Location: ALABAMA
Contact:

Post by gllt »

Indescribable. Also somewhat animated.

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

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


My new blur shader.

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;
} 
or to colored pencilize ^
gllt
NO VOWELS >:[
Posts: 753
Joined: Sun Aug 31, 2008 12:59 pm
Location: ALABAMA
Contact:

Post by gllt »

Image
Verdauga Greeneyes
Regular
Posts: 347
Joined: Tue Mar 07, 2006 10:32 am
Location: The Netherlands

Post by Verdauga Greeneyes »

Zany. Wish I could finish my filter >.< (when I say finish I mean 'work on for a month with no guarantee of success')
gllt
NO VOWELS >:[
Posts: 753
Joined: Sun Aug 31, 2008 12:59 pm
Location: ALABAMA
Contact:

Post by gllt »

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

Paint-in;

Effect varies between games/systems and trying different filters is encouraged with all shaders.

Image

http://i34.tinypic.com/11m6wxz.png
gllt
NO VOWELS >:[
Posts: 753
Joined: Sun Aug 31, 2008 12:59 pm
Location: ALABAMA
Contact:

HI CONTRAST

Post by gllt »

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


Image
I.S.T.
Zealot
Posts: 1325
Joined: Tue Nov 27, 2007 7:03 am

Post by I.S.T. »

Wow.
gllt
NO VOWELS >:[
Posts: 753
Joined: Sun Aug 31, 2008 12:59 pm
Location: ALABAMA
Contact:

Post by gllt »

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(); }
}
"Now they're just screwing with us."

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(); }
}
tetsuo55
Regular
Posts: 307
Joined: Sat Mar 04, 2006 3:17 pm

Post by tetsuo55 »

gllt your shaders are awesome.

i wonder would you be able to make this?:

http://security-emulation.blogspot.com/ ... ation.html
gllt
NO VOWELS >:[
Posts: 753
Joined: Sun Aug 31, 2008 12:59 pm
Location: ALABAMA
Contact:

Post by gllt »

tetsuo55 wrote:gllt your shaders are awesome.

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.

But not impossible! [/determination]
gllt
NO VOWELS >:[
Posts: 753
Joined: Sun Aug 31, 2008 12:59 pm
Location: ALABAMA
Contact:

Post by gllt »

EVERY GAME IS KILL BILL/MCDONALDS

Image

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