some more shaders...

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3453 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
omegadox 2009-06-15 17:40:33 +00:00
parent 0c4c35d732
commit 4395417b68
5 changed files with 65 additions and 2 deletions

View File

@ -0,0 +1,19 @@
uniform samplerRECT samp0 : register(s0);
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
{
float4 c0 = texRECT(samp0, uv0).rgba;
float4 c1 = texRECT(samp0, uv0 + float2(5,5)).rgba;
float y = (0.222 * c1.r) + (0.707 * c1.g) + (0.071 * c1.b);
float y2 = ((0.222 * c0.r) + (0.707 * c0.g) + (0.071 * c0.b)) / 3;
float red = c0.r;
float green = c0.g;
float blue = c0.b;
float alpha = c0.a;
red = y2 + (1 - y);
green = y2 + (1 - y);
blue = y2 + (1 - y);
ocol0 = float4(red, green, blue, alpha);
}

View File

@ -0,0 +1,17 @@
uniform samplerRECT samp0 : register(s0);
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
{
float4 c0 = texRECT(samp0, uv0).rgba;
float4 c1 = texRECT(samp0, uv0 + float2(1,1)).rgba;
float4 c2 = texRECT(samp0, uv0 + float2(-1,-1)).rgba;
float red = c0.r;
float green = c0.g;
float blue = c0.b;
float alpha = c0.a;
red = c0.r - c1.b;
blue = c0.b - c2.r + (c0.g - c0.r);
ocol0 = float4(red, 0.0, blue, alpha);
}

View File

@ -0,0 +1,9 @@
uniform samplerRECT samp0 : register(s0);
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
{
float4 c0 = texRECT(samp0, uv0).rgba;
// Info: http://www.oreillynet.com/cs/user/view/cs_msg/8691
float avg = (0.222 * c0.r) + (0.707 * c0.g) + (0.071 * c0.b);
ocol0 = float4(avg, avg, avg, c0.a);
}

View File

@ -0,0 +1,17 @@
uniform samplerRECT samp0 : register(s0);
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
{
float4 c0 = texRECT(samp0, uv0).rgba;
float4 c1 = texRECT(samp0, uv0 + float2(3,3)).rgba;
float red = c0.r;
float green = c0.g;
float blue = c0.b;
float alpha = c0.a;
red = c0.r - c1.r;
green = c0.g - c1.g;
blue = c0.b - c1.b;
ocol0 = float4(red, green, blue, alpha);
}

View File

@ -5,11 +5,12 @@ uniform samplerRECT samp0 : register(s0);
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
{
float sep = 5;
float4 c0 = texRECT(samp0, uv0).rgba; // Source Color
float sep = 5;
float red = c0.r;
float green = c0.g;
float blue = c0.b;
// Red Eye (Red)
float4 c1 = texRECT(samp0, uv0 + float2(sep,0)).rgba;
@ -17,7 +18,7 @@ void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
// Right Eye (Cyan)
float4 c2 = texRECT(samp0, uv0 + float2(-sep,0)).rgba;
float cyan = (c2.r + c2.g + c2.b) / 3;
float cyan = (c2.g + c2.b) / 2;
green = max(c0.g, cyan);
blue = max(c0.b, cyan);