mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
Merge dolphin-shaders-database
This commit is contained in:
@@ -0,0 +1,109 @@
|
||||
uniform samplerRECT samp0 : register(s0);
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
|
||||
//Change this number to increase the pixel size.
|
||||
int pixelSize = 3;
|
||||
|
||||
float red = 0.0;
|
||||
float green = 0.0;
|
||||
float blue = 0.0;
|
||||
int val = uv0[0];
|
||||
int val2 = uv0[1];
|
||||
|
||||
val = val % pixelSize;
|
||||
val2 = val2 % pixelSize;
|
||||
|
||||
if(val == 0 && val2 == 0 ){
|
||||
if (c0.r < 0.1 && c0.r >= 0)
|
||||
red = 0.1;
|
||||
if (c0.r < 0.20 && c0.r >= 0.1)
|
||||
red = 0.20;
|
||||
if (c0.r <0.40 && c0.r >= 0.20)
|
||||
red = 0.40;
|
||||
if (c0.r <0.60 && c0.r >= 0.40)
|
||||
red = 0.60;
|
||||
if (c0.r <0.80 && c0.r >= 0.60)
|
||||
red = 0.80;
|
||||
if (c0.r >= 0.80)
|
||||
red = 1;
|
||||
|
||||
if (c0.b < 0.1 && c0.b >= 0)
|
||||
blue = 0.1;
|
||||
if (c0.b < 0.20 && c0.b >= 0.1)
|
||||
blue = 0.20;
|
||||
if (c0.b <0.40 && c0.b >= 0.20)
|
||||
blue = 0.40;
|
||||
if (c0.b <0.60 && c0.b >= 0.40)
|
||||
blue = 0.60;
|
||||
if (c0.b <0.80 && c0.b >= 0.60)
|
||||
blue = 0.80;
|
||||
if (c0.b >= 0.80)
|
||||
blue = 1;
|
||||
|
||||
|
||||
if (c0.g < 0.1 && c0.g >= 0)
|
||||
green = 0.1;
|
||||
if (c0.g < 0.20 && c0.g >= 0.1)
|
||||
green = 0.20;
|
||||
if (c0.g <0.40 && c0.g >= 0.20)
|
||||
green = 0.40;
|
||||
if (c0.g <0.60 && c0.g >= 0.40)
|
||||
green = 0.60;
|
||||
if (c0.g <0.80 && c0.g >= 0.60)
|
||||
green = 0.80;
|
||||
if (c0.g >= 0.80)
|
||||
green = 1;
|
||||
|
||||
}
|
||||
else{
|
||||
float4 c1 = texRECT(samp0, uv0-float2(val, val2)).rgba;
|
||||
|
||||
if (c1.r < 0.1 && c1.r >= 0)
|
||||
red = 0.1;
|
||||
if (c1.r < 0.20 && c1.r >= 0.1)
|
||||
red = 0.20;
|
||||
if (c1.r <0.40 && c1.r >= 0.20)
|
||||
red = 0.40;
|
||||
if (c1.r <0.60 && c1.r >= 0.40)
|
||||
red = 0.60;
|
||||
if (c1.r <0.80 && c1.r >= 0.60)
|
||||
red = 0.80;
|
||||
if (c1.r >= 0.80)
|
||||
red = 1;
|
||||
|
||||
if (c1.b < 0.1 && c1.b >= 0)
|
||||
blue = 0.1;
|
||||
if (c1.b < 0.20 && c1.b >= 0.1)
|
||||
blue = 0.20;
|
||||
if (c1.b <0.40 && c1.b >= 0.20)
|
||||
blue = 0.40;
|
||||
if (c1.b <0.60 && c1.b >= 0.40)
|
||||
blue = 0.60;
|
||||
if (c1.b <0.80 && c1.b >= 0.60)
|
||||
blue = 0.80;
|
||||
if (c1.b >= 0.80)
|
||||
blue = 1;
|
||||
|
||||
|
||||
if (c1.g < 0.1 && c1.g >= 0)
|
||||
green = 0.1;
|
||||
if (c1.g < 0.20 && c1.g >= 0.1)
|
||||
green = 0.20;
|
||||
if (c1.g <0.40 && c1.g >= 0.20)
|
||||
green = 0.40;
|
||||
if (c1.g <0.60 && c1.g >= 0.40)
|
||||
green = 0.60;
|
||||
if (c1.g <0.80 && c1.g >= 0.60)
|
||||
green = 0.80;
|
||||
if (c1.g >= 0.80)
|
||||
green = 1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
ocol0 = float4(red, green, blue, c0.a);
|
||||
}
|
||||
@@ -0,0 +1,157 @@
|
||||
uniform samplerRECT samp0 : register(s0);
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
|
||||
//Change this number to increase the pixel size.
|
||||
int pixelSize = 2;
|
||||
|
||||
float red = 0.0;
|
||||
float green = 0.0;
|
||||
float blue = 0.0;
|
||||
int val = uv0[0];
|
||||
int val2 = uv0[1];
|
||||
|
||||
val = val % pixelSize;
|
||||
val2 = val2 % pixelSize;
|
||||
|
||||
if(val == 0 && val2 == 0 ){
|
||||
if (c0.r < 0.06 && c0.r >= 0)
|
||||
red = 0.06;
|
||||
if (c0.r < 0.13 && c0.r >= 0.06)
|
||||
red = 0.13;
|
||||
if (c0.r < 0.26 && c0.r >= 0.13)
|
||||
red = 0.26;
|
||||
if (c0.r < 0.33 && c0.r >= 0.26)
|
||||
red = 0.33;
|
||||
if (c0.r <0.46 && c0.r >= 0.33)
|
||||
red = 0.46;
|
||||
if (c0.r <0.60 && c0.r >= 0.46)
|
||||
red = 0.60;
|
||||
if (c0.r <0.73 && c0.r >= 0.60)
|
||||
red = 0.73;
|
||||
if (c0.r <0.80 && c0.r >= 0.73)
|
||||
red = 0.80;
|
||||
if (c0.r <0.93 && c0.r >= 0.80)
|
||||
red = 0.93;
|
||||
if (c0.r <=1 && c0.r >= 0.93)
|
||||
red = 1;
|
||||
|
||||
if (c0.b < 0.06 && c0.b >= 0)
|
||||
blue = 0.06;
|
||||
if (c0.b < 0.13 && c0.b >= 0.06)
|
||||
blue = 0.13;
|
||||
if (c0.b < 0.26 && c0.b >= 0.13)
|
||||
blue = 0.26;
|
||||
if (c0.b < 0.33 && c0.b >= 0.26)
|
||||
blue = 0.33;
|
||||
if (c0.b <0.46 && c0.b >= 0.33)
|
||||
blue = 0.46;
|
||||
if (c0.b <0.60 && c0.b >= 0.46)
|
||||
blue = 0.60;
|
||||
if (c0.b <0.73 && c0.b >= 0.60)
|
||||
blue = 0.73;
|
||||
if (c0.b <0.80 && c0.b >= 0.73)
|
||||
blue = 0.80;
|
||||
if( c0.b <0.93 && c0.b >= 0.80)
|
||||
blue = 0.93;
|
||||
if (c0.b <=1 && c0.b >= 0.93)
|
||||
blue = 1;
|
||||
|
||||
|
||||
if (c0.g < 0.06 && c0.g >= 0)
|
||||
green = 0.06;
|
||||
if (c0.g < 0.13 && c0.g >= 0.06)
|
||||
green = 0.13;
|
||||
if (c0.g < 0.26 && c0.g >= 0.13)
|
||||
green = 0.26;
|
||||
if (c0.g < 0.33 && c0.g >= 0.26)
|
||||
green = 0.33;
|
||||
if (c0.g <0.46 && c0.g >= 0.33)
|
||||
green = 0.46;
|
||||
if (c0.g <0.60 && c0.g >= 0.46)
|
||||
green = 0.60;
|
||||
if (c0.g <0.73 && c0.g >= 0.60)
|
||||
green = 0.73;
|
||||
if (c0.g <0.80 && c0.g >= 0.73)
|
||||
green = 0.80;
|
||||
if( c0.g <0.93 && c0.g >= 0.80)
|
||||
green = 0.93;
|
||||
if (c0.g <=1 && c0.g >= 0.93)
|
||||
green = 1;
|
||||
|
||||
}
|
||||
else{
|
||||
float4 c1 = texRECT(samp0, uv0-float2(val, val2)).rgba;
|
||||
|
||||
if (c1.r < 0.06 && c1.r >= 0)
|
||||
red = 0.06;
|
||||
if (c1.r < 0.13 && c1.r >= 0.06)
|
||||
red = 0.13;
|
||||
if (c1.r < 0.26 && c1.r >= 0.13)
|
||||
red = 0.26;
|
||||
if (c1.r < 0.33 && c1.r >= 0.26)
|
||||
red = 0.33;
|
||||
if (c1.r <0.46 && c1.r >= 0.33)
|
||||
red = 0.46;
|
||||
if (c1.r <0.60 && c1.r >= 0.46)
|
||||
red = 0.60;
|
||||
if (c1.r <0.73 && c1.r >= 0.60)
|
||||
red = 0.73;
|
||||
if (c1.r <0.80 && c1.r >= 0.73)
|
||||
red = 0.80;
|
||||
if (c1.r <0.93 && c1.r >= 0.80)
|
||||
red = 0.93;
|
||||
if (c1.r <=1 && c1.r >= 0.93)
|
||||
red = 1;
|
||||
|
||||
if (c1.b < 0.06 && c1.b >= 0)
|
||||
blue = 0.06;
|
||||
if (c1.b < 0.13 && c1.b >= 0.06)
|
||||
blue = 0.13;
|
||||
if (c1.b < 0.26 && c1.b >= 0.13)
|
||||
blue = 0.26;
|
||||
if (c1.b < 0.33 && c1.b >= 0.26)
|
||||
blue = 0.33;
|
||||
if (c1.b <0.46 && c1.b >= 0.33)
|
||||
blue = 0.46;
|
||||
if (c1.b <0.60 && c1.b >= 0.46)
|
||||
blue = 0.60;
|
||||
if (c1.b <0.73 && c1.b >= 0.60)
|
||||
blue = 0.73;
|
||||
if (c1.b <0.80 && c1.b >= 0.73)
|
||||
blue = 0.80;
|
||||
if( c1.b <0.93 && c1.b >= 0.80)
|
||||
blue = 0.93;
|
||||
if (c1.b <=1 && c1.b >= 0.93)
|
||||
blue = 1;
|
||||
|
||||
|
||||
if (c1.g < 0.06 && c1.g >= 0)
|
||||
green = 0.06;
|
||||
if (c1.g < 0.13 && c1.g >= 0.06)
|
||||
green = 0.13;
|
||||
if (c1.g < 0.26 && c1.g >= 0.13)
|
||||
green = 0.26;
|
||||
if (c1.g < 0.33 && c1.g >= 0.26)
|
||||
green = 0.33;
|
||||
if (c1.g <0.46 && c1.g >= 0.33)
|
||||
green = 0.46;
|
||||
if (c1.g <0.60 && c1.g >= 0.46)
|
||||
green = 0.60;
|
||||
if (c1.g <0.73 && c1.g >= 0.60)
|
||||
green = 0.73;
|
||||
if (c1.g <0.80 && c1.g >= 0.73)
|
||||
green = 0.80;
|
||||
if( c1.g <0.93 && c1.g >= 0.80)
|
||||
green = 0.93;
|
||||
if ( c1.g >= 0.93)
|
||||
green = 1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
ocol0 = float4(red, green, blue, c0.a);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
//dummy shader:
|
||||
uniform samplerRECT samp0 : register(s0);
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
ocol0 = float4(c0.r, c0.g, c0.b, c0.a);
|
||||
}
|
||||
/*
|
||||
And now that's over with, the contents of this readme file!
|
||||
For best results, turn Wordwrap formatting on...
|
||||
The shaders shown in the dropdown box in the video plugin configuration window are kept in the directory named User/Data/Shaders. They are linked in to the dolphin source from the repository at <http://dolphin-shaders-database.googlecode.com/svn/trunk/>. See <http://code.google.com/p/dolphin-shaders-database/wiki/Documentation> for more details on the way shaders work.
|
||||
|
||||
This file will hopefully hold more content in future...
|
||||
*/
|
||||
@@ -0,0 +1,18 @@
|
||||
uniform samplerRECT samp0 : register(s0);
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
float red = 0.0;
|
||||
float blue = 0.0;
|
||||
|
||||
if (c0.r > 0.15 && c0.b > 0.15)
|
||||
{
|
||||
blue = 0.5;
|
||||
red = 0.5;
|
||||
}
|
||||
|
||||
float green = max(c0.r + c0.b, c0.g);
|
||||
|
||||
ocol0 = float4(red, green, blue, 1.0);
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
uniform samplerRECT samp0 : register(s0);
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
{
|
||||
ocol0 = (texRECT(samp0, uv0+1).rgba - texRECT(samp0, uv0-1).rgba)*8;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
uniform samplerRECT samp0 : register(s0);
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
{
|
||||
ocol0 = texRECT(samp0, uv0+1).rgba * 1.3 * abs(texRECT(samp0, uv0+1).rgba - texRECT(samp0, uv0-1).rgba)*8;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
uniform samplerRECT samp0 : register(s0);
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
{
|
||||
float4 to_gray = float4(0.3,0.59,0.11,0);
|
||||
float x1 = dot(to_gray, texRECT(samp0, uv0+float2(1,1)));
|
||||
float x0 = dot(to_gray, texRECT(samp0, uv0+float2(-1,-1)));
|
||||
float x3 = dot(to_gray, texRECT(samp0, uv0+float2(1,-1)));
|
||||
float x2 = dot(to_gray, texRECT(samp0, uv0+float2(-1,1)));
|
||||
float edge = (x1 - x0) * (x1 - x0);
|
||||
float edge2 = (x3 - x2) * (x3 - x2);
|
||||
edge += edge2;
|
||||
float4 color = texRECT(samp0, uv0).rgba;
|
||||
|
||||
ocol0 = max(color - float4(edge, edge, edge, edge) * 12, float4(0,0,0,0));
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
uniform samplerRECT samp0 : register(s0);
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
{
|
||||
//Changethis to increase the number of colors.
|
||||
float numColors =8;
|
||||
|
||||
float4 to_gray = float4(0.3,0.59,0.11,0);
|
||||
float x1 = dot(to_gray, texRECT(samp0, uv0+float2(1,1)));
|
||||
float x0 = dot(to_gray, texRECT(samp0, uv0+float2(-1,-1)));
|
||||
float x3 = dot(to_gray, texRECT(samp0, uv0+float2(1,-1)));
|
||||
float x2 = dot(to_gray, texRECT(samp0, uv0+float2(-1,1)));
|
||||
float edge = (x1 - x0) * (x1 - x0);
|
||||
float edge2 = (x3 - x2) * (x3 - x2);
|
||||
edge += edge2;
|
||||
float4 color = texRECT(samp0, uv0).rgba;
|
||||
|
||||
float4 c0 = max(color - float4(edge, edge, edge, edge) * 12, float4(0,0,0,0));
|
||||
|
||||
//Change this number to increase the pixel size.
|
||||
int pixelSize = 1;
|
||||
|
||||
|
||||
float red = 0.0;
|
||||
float green = 0.0;
|
||||
float blue = 0.0;
|
||||
bool rr = false;
|
||||
bool bb = false;
|
||||
bool gg = false;
|
||||
int val = uv0[0];
|
||||
int val2 = uv0[1];
|
||||
int count = 1;
|
||||
|
||||
double colorN = 0.0;
|
||||
double colorB = 0.0;
|
||||
val = val % pixelSize;
|
||||
val2 = val2 % pixelSize;
|
||||
|
||||
//if(val == 0 && val2 == 0 )
|
||||
// c0 = texRECT(samp0, uv0).rgba;
|
||||
//else
|
||||
// c0 = texRECT(samp0, uv0-float2(val, val2)).rgba;
|
||||
|
||||
for(count = 1; count <= numColors ; count++){
|
||||
colorN = count / numColors;
|
||||
|
||||
if ( c0.r <= colorN && c0.r >= colorB && rr == false ){
|
||||
if (count == 1){
|
||||
if(colorN >= 0.1)
|
||||
red = 0.01;
|
||||
else
|
||||
red = colorN;
|
||||
}
|
||||
else if (count == numColors)
|
||||
red = 0.95;
|
||||
else
|
||||
red = colorN ;
|
||||
|
||||
rr = true;
|
||||
}
|
||||
|
||||
if (c0.b <= colorN && c0.b >= colorB && bb == false){
|
||||
if (count == 1){
|
||||
if(colorN >= 0.1)
|
||||
blue = 0.01;
|
||||
else
|
||||
blue = colorN;
|
||||
}
|
||||
else if (count == numColors)
|
||||
blue = 0.95;
|
||||
else
|
||||
blue = colorN ;
|
||||
|
||||
bb = true;
|
||||
}
|
||||
|
||||
if (c0.g <= colorN && c0.g >= colorB && gg == false){
|
||||
if (count == 1){
|
||||
if(colorN >= 0.1)
|
||||
green = 0.01;
|
||||
else
|
||||
green = colorN;
|
||||
}
|
||||
else if (count == numColors)
|
||||
green = 0.95 ;
|
||||
else
|
||||
green = colorN ;
|
||||
gg = true;
|
||||
}
|
||||
|
||||
colorB = count / numColors;
|
||||
if(rr == true && bb == true && gg == true)
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
ocol0 = float4(red, green, blue, c0.a);
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
uniform samplerRECT samp0 : register(s0);
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0, in float2 uv1 : TEXCOORD1)
|
||||
{
|
||||
float4 c_center = texRECT(samp0, uv0.xy).rgba;
|
||||
|
||||
float4 bloom_sum = float4(0.0, 0.0, 0.0, 0.0);
|
||||
uv0 += float2(0.3, 0.3);
|
||||
float radius1 = 1.3;
|
||||
bloom_sum += texRECT(samp0, uv0 + float2(-1.5, -1.5) * radius1);
|
||||
bloom_sum += texRECT(samp0, uv0 + float2(-2.5, 0) * radius1);
|
||||
bloom_sum += texRECT(samp0, uv0 + float2(-1.5, 1.5) * radius1);
|
||||
bloom_sum += texRECT(samp0, uv0 + float2(0, 2.5) * radius1);
|
||||
bloom_sum += texRECT(samp0, uv0 + float2(1.5, 1.5) * radius1);
|
||||
bloom_sum += texRECT(samp0, uv0 + float2(2.5, 0) * radius1);
|
||||
bloom_sum += texRECT(samp0, uv0 + float2(1.5, -1.5) * radius1);
|
||||
bloom_sum += texRECT(samp0, uv0 + float2(0, -2.5) * radius1);
|
||||
|
||||
float radius2 = 4.6;
|
||||
bloom_sum += texRECT(samp0, uv0 + float2(-1.5, -1.5) * radius2);
|
||||
bloom_sum += texRECT(samp0, uv0 + float2(-2.5, 0) * radius2);
|
||||
bloom_sum += texRECT(samp0, uv0 + float2(-1.5, 1.5) * radius2);
|
||||
bloom_sum += texRECT(samp0, uv0 + float2(0, 2.5) * radius2);
|
||||
bloom_sum += texRECT(samp0, uv0 + float2(1.5, 1.5) * radius2);
|
||||
bloom_sum += texRECT(samp0, uv0 + float2(2.5, 0) * radius2);
|
||||
bloom_sum += texRECT(samp0, uv0 + float2(1.5, -1.5) * radius2);
|
||||
bloom_sum += texRECT(samp0, uv0 + float2(0, -2.5) * radius2);
|
||||
|
||||
bloom_sum *= 0.07;
|
||||
bloom_sum -= float4(0.3, 0.3, 0.3, 0.3);
|
||||
bloom_sum = max(bloom_sum, float4(0,0,0,0));
|
||||
|
||||
float2 vpos = (uv1 - float2(.5, .5)) * 2;
|
||||
float dist = (dot(vpos, vpos));
|
||||
dist = 1 - 0.4*dist;
|
||||
|
||||
ocol0 = (c_center * 0.7 + bloom_sum) * dist;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
uniform samplerRECT samp0 : register(s0);
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
c0 += c0 * 2;
|
||||
ocol0 = float4(c0.r, c0.g, c0.b, c0.a);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
uniform samplerRECT samp0 : register(s0);
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
float red = 0.0;
|
||||
float green = 0.0;
|
||||
|
||||
if (c0.r < 0.35 || c0.b > 0.35)
|
||||
{
|
||||
green = c0.g + (c0.b / 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
//red = 1 - c0.r + (c0.b / 2);
|
||||
red = c0.r + 0.4;
|
||||
}
|
||||
|
||||
ocol0 = float4(red, green, 0.0, 1.0);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
uniform samplerRECT samp0 : register(s0);
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
float red = 0.0;
|
||||
float green = 0.0;
|
||||
float blue = 0.0;
|
||||
|
||||
if (c0.r < 0.50 || c0.b > 0.5)
|
||||
{
|
||||
blue = c0.r;
|
||||
red = c0.g;
|
||||
}
|
||||
else
|
||||
{
|
||||
blue = c0.r;
|
||||
green = c0.r;
|
||||
}
|
||||
|
||||
ocol0 = float4(red, green, blue, 1.0);
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
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, 0)).rgba;
|
||||
float4 c2 = texRECT(samp0, uv0 - float2(0, 1)).rgba;
|
||||
float4 c3 = texRECT(samp0, uv0 + float2(1, 0)).rgba;
|
||||
float4 c4 = texRECT(samp0, uv0 + float2(0, 1)).rgba;
|
||||
|
||||
float red = c0.r;
|
||||
float blue = c0.b;
|
||||
float green = c0.g;
|
||||
|
||||
float red2 = (c1.r + c2.r + c3.r + c4.r) / 4;
|
||||
float blue2 = (c1.b + c2.b + c3.b + c4.b) / 4;
|
||||
float green2 = (c1.g + c2.g + c3.g + c4.g) / 4;
|
||||
|
||||
if(red2 > 0.3)
|
||||
red = c0.r + c0.r / 2 ;
|
||||
else
|
||||
red = c0.r - c0.r / 2 ;
|
||||
|
||||
if(green2 > 0.3)
|
||||
green = c0.g+ c0.g / 2;
|
||||
else
|
||||
green = c0.g - c0.g / 2;
|
||||
|
||||
|
||||
if(blue2 > 0.3)
|
||||
blue = c0.b+ c0.b / 2 ;
|
||||
else
|
||||
blue = c0.b - c0.b / 2 ;
|
||||
|
||||
ocol0 = float4(red, green, blue, c0.a);
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
uniform samplerRECT samp0 : register(s0);
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
float red = 0.0;
|
||||
float green = 0.0;
|
||||
float blue = 0.0;
|
||||
|
||||
red = c0.r;
|
||||
|
||||
|
||||
if (c0.r > 0.0)
|
||||
{
|
||||
if (c0.g > c0.r)
|
||||
{
|
||||
green = (c0.g - (c0.g - c0.r)) / 3;
|
||||
}
|
||||
}
|
||||
|
||||
if (c0.b > 0.0 && c0.r < 0.25)
|
||||
{
|
||||
red = c0.b;
|
||||
green = c0.b / 3;
|
||||
}
|
||||
|
||||
if (c0.g > 0.0 && c0.r < 0.25)
|
||||
{
|
||||
red = c0.g;
|
||||
green = c0.g / 3;
|
||||
}
|
||||
|
||||
if (((c0.r + c0.g + c0.b) / 3) > 0.9)
|
||||
{
|
||||
green = c0.r / 3;
|
||||
}
|
||||
|
||||
ocol0 = float4(red, green, blue, 1.0);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
uniform samplerRECT samp0 : register(s0);
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
float red = 0.0;
|
||||
float green = 0.0;
|
||||
float blue = 0.0;
|
||||
float avg = (c0.r + c0.g + c0.b) / 3;
|
||||
|
||||
red = c0.r + (c0.g / 2) + (c0.b / 3);
|
||||
green = c0.r / 3;
|
||||
|
||||
ocol0 = float4(red, green, blue, 1.0);
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
uniform samplerRECT samp0 : register(s0);
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
float avg = (c0.r + c0.g + c0.b) / 3.0;
|
||||
ocol0 = float4(avg, avg, avg, c0.a);
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
uniform samplerRECT samp0 : register(s0);
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
ocol0 = float4(1.0, 1.0, 1.0, 1.0) - c0;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user