diff --git a/README.txt b/README.txt
index 0bf9dba0b7..9667f2bcef 100644
--- a/README.txt
+++ b/README.txt
@@ -1,15 +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 . See for more details on the way shaders work.
-
-This file will hopefully hold more content in future...
+//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 . See for more details on the way shaders work.
+
+This file will hopefully hold more content in future...
*/
\ No newline at end of file
diff --git a/acidmetal.txt b/acidmetal.txt
index 8500f75dd4..c3fed07f7c 100644
--- a/acidmetal.txt
+++ b/acidmetal.txt
@@ -1,18 +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);
+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);
}
\ No newline at end of file
diff --git a/acidtrip.txt b/acidtrip.txt
index a5abb48d8a..28df921854 100644
--- a/acidtrip.txt
+++ b/acidtrip.txt
@@ -1,6 +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;
-}
+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;
+}
diff --git a/acidtrip2.txt b/acidtrip2.txt
index 6673879589..c0fda12605 100644
--- a/acidtrip2.txt
+++ b/acidtrip2.txt
@@ -1,6 +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;
-}
+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;
+}
diff --git a/auto_toon.txt b/auto_toon.txt
index 7c7e94387d..5639f65372 100644
--- a/auto_toon.txt
+++ b/auto_toon.txt
@@ -1,16 +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));
-}
+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));
+}
diff --git a/auto_toon2.txt b/auto_toon2.txt
index 058a839678..1ecd7ac981 100644
--- a/auto_toon2.txt
+++ b/auto_toon2.txt
@@ -1,99 +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);
+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);
}
\ No newline at end of file
diff --git a/bad_bloom.txt b/bad_bloom.txt
index 1c73998f00..eb01c901f9 100644
--- a/bad_bloom.txt
+++ b/bad_bloom.txt
@@ -1,38 +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;
-}
+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;
+}
diff --git a/brighten.txt b/brighten.txt
index ad1ae67572..ceb877b3b5 100644
--- a/brighten.txt
+++ b/brighten.txt
@@ -1,8 +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);
+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);
}
\ No newline at end of file
diff --git a/chrismas.txt b/chrismas.txt
index 1fa852b8a2..abc8c1a76f 100644
--- a/chrismas.txt
+++ b/chrismas.txt
@@ -1,20 +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);
+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);
}
\ No newline at end of file
diff --git a/cool1.txt b/cool1.txt
index 75780bfcbf..0a4cd9a65d 100644
--- a/cool1.txt
+++ b/cool1.txt
@@ -1,22 +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);
+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);
}
\ No newline at end of file
diff --git a/darkerbrighter.txt b/darkerbrighter.txt
index 1fafe0646a..55b470a4e5 100644
--- a/darkerbrighter.txt
+++ b/darkerbrighter.txt
@@ -1,36 +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);
+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);
}
\ No newline at end of file
diff --git a/emboss.txt b/emboss.txt
index 62850dff44..94f420056d 100644
--- a/emboss.txt
+++ b/emboss.txt
@@ -1,19 +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);
+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);
}
\ No newline at end of file
diff --git a/fire.txt b/fire.txt
index 6094307f40..bf96247e46 100644
--- a/fire.txt
+++ b/fire.txt
@@ -1,39 +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);
+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);
}
\ No newline at end of file
diff --git a/fire2.txt b/fire2.txt
index 3f7c09e3db..899235c326 100644
--- a/fire2.txt
+++ b/fire2.txt
@@ -1,15 +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);
+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);
}
\ No newline at end of file
diff --git a/firewater.txt b/firewater.txt
index c610f40d45..d8616d6381 100644
--- a/firewater.txt
+++ b/firewater.txt
@@ -1,17 +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);
+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);
}
\ No newline at end of file
diff --git a/grayscale.txt b/grayscale.txt
index 85fee9e546..7a654c3458 100644
--- a/grayscale.txt
+++ b/grayscale.txt
@@ -1,8 +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);
-}
+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);
+}
diff --git a/grayscale2.txt b/grayscale2.txt
index bf179dcbbb..dd3a891e2b 100644
--- a/grayscale2.txt
+++ b/grayscale2.txt
@@ -1,9 +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);
-}
+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);
+}
diff --git a/invert.txt b/invert.txt
index efd57def22..e5f5925fb0 100644
--- a/invert.txt
+++ b/invert.txt
@@ -1,7 +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;
-}
+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;
+}
diff --git a/invert_blue.txt b/invert_blue.txt
index 7d6cf651ca..c52e69da46 100644
--- a/invert_blue.txt
+++ b/invert_blue.txt
@@ -1,7 +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(0.0, 0.0, 0.7, 1.0) - c0;
+uniform samplerRECT samp0 : register(s0);
+
+void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
+{
+ float4 c0 = texRECT(samp0, uv0).rgba;
+ ocol0 = float4(0.0, 0.0, 0.7, 1.0) - c0;
}
\ No newline at end of file
diff --git a/invertedoutline.txt b/invertedoutline.txt
index 4131f6a299..dbce732a68 100644
--- a/invertedoutline.txt
+++ b/invertedoutline.txt
@@ -1,9 +1,9 @@
-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;
-
- ocol0 = c0 - c1;
+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;
+
+ ocol0 = c0 - c1;
}
\ No newline at end of file
diff --git a/mad_world.txt b/mad_world.txt
index 1f7184fe67..4b71c36a2c 100644
--- a/mad_world.txt
+++ b/mad_world.txt
@@ -1,17 +1,17 @@
-uniform samplerRECT samp0 : register(s0);
-
-void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
-{
- float4 emboss = (texRECT(samp0, uv0+1).rgba - texRECT(samp0, uv0-1).rgba)*2.0f;
- emboss -= (texRECT(samp0, uv0+float2(1,-1)).rgba - texRECT(samp0, uv0+float2(-1,1)).rgba);
- float4 color = texRECT(samp0, uv0).rgba;
- if (color.r > 0.8 && color.b + color.b < 0.2)
- ocol0 = float4(1,0,0,0);
- else {
- color += emboss;
- if (dot(color.rgb, float3(0.3, 0.5, 0.2)) > 0.5)
- ocol0 = float4(1,1,1,1);
- else
- ocol0 = float4(0,0,0,0);
- }
+uniform samplerRECT samp0 : register(s0);
+
+void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
+{
+ float4 emboss = (texRECT(samp0, uv0+1).rgba - texRECT(samp0, uv0-1).rgba)*2.0f;
+ emboss -= (texRECT(samp0, uv0+float2(1,-1)).rgba - texRECT(samp0, uv0+float2(-1,1)).rgba);
+ float4 color = texRECT(samp0, uv0).rgba;
+ if (color.r > 0.8 && color.b + color.b < 0.2)
+ ocol0 = float4(1,0,0,0);
+ else {
+ color += emboss;
+ if (dot(color.rgb, float3(0.3, 0.5, 0.2)) > 0.5)
+ ocol0 = float4(1,1,1,1);
+ else
+ ocol0 = float4(0,0,0,0);
+ }
}
\ No newline at end of file
diff --git a/nightvision.txt b/nightvision.txt
index db354d0b81..995268fc3c 100644
--- a/nightvision.txt
+++ b/nightvision.txt
@@ -1,14 +1,14 @@
-uniform samplerRECT samp0 : register(s0);
-
-void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
-{
- float4 c0 = texRECT(samp0, uv0).rgba;
- float green = c0.g;
-
- if (c0.g < 0.50)
- {
- green = c0.r + c0.b;
- }
-
- ocol0 = float4(0.0, green, 0.0, 1.0);
+uniform samplerRECT samp0 : register(s0);
+
+void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
+{
+ float4 c0 = texRECT(samp0, uv0).rgba;
+ float green = c0.g;
+
+ if (c0.g < 0.50)
+ {
+ green = c0.r + c0.b;
+ }
+
+ ocol0 = float4(0.0, green, 0.0, 1.0);
}
\ No newline at end of file
diff --git a/nightvision2.txt b/nightvision2.txt
index 13a51e598e..5f8b19b4ec 100644
--- a/nightvision2.txt
+++ b/nightvision2.txt
@@ -1,51 +1,51 @@
-uniform samplerRECT samp0 : register(s0);
-
-void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
-{
- //variables
- int internalresolution = 1278;
- float4 c0 = texRECT(samp0, uv0).rgba;
- //blur
- float4 blurtotal = float4(0, 0, 0, 0);
- float blursize = 1.5;
- blurtotal += texRECT(samp0, uv0 + float2(-blursize, -blursize));
- blurtotal += texRECT(samp0, uv0 + float2(-blursize, blursize));
- blurtotal += texRECT(samp0, uv0 + float2( blursize, -blursize));
- blurtotal += texRECT(samp0, uv0 + float2( blursize, blursize));
- blurtotal += texRECT(samp0, uv0 + float2(-blursize, 0));
- blurtotal += texRECT(samp0, uv0 + float2( blursize, 0));
- blurtotal += texRECT(samp0, uv0 + float2( 0, -blursize));
- blurtotal += texRECT(samp0, uv0 + float2( 0, blursize));
- blurtotal *= 0.125;
- c0 = blurtotal;
- //greyscale
- float grey = ((0.3 * c0.r) + (0.4 * c0.g) + (0.3 * c0.b));
- // brighten
- grey = grey * 0.5 + 0.7;
- // darken edges
- float x = uv0[0];
- float y = uv0[1];
- if (x > internalresolution/2) x = internalresolution-x;
- if (y > internalresolution/2) y = internalresolution-y;
- if (x > internalresolution/2*0.95) x = internalresolution/2*0.95;
- if (y > internalresolution/2*0.95) y = internalresolution/2*0.95;
- x = -x+641;
- y = -y+641;
- /*****inline square root routines*****/
- // bit of a performance bottleneck.
- // neccessary to make the darkened area rounded
- // instead of rhombus-shaped.
- float sqrt=x/10;
- while((sqrt*sqrt) < x) sqrt+=0.1;
- x = sqrt;
- sqrt=y/10;
- while((sqrt*sqrt) < y) sqrt+=0.1;
- y = sqrt;
- /*****end of inline square root routines*****/
- x *= 2;
- y *= 2;
- grey -= x/200;
- grey -= y/200;
- // output
- ocol0 = float4(0, grey, 0, 1.0);
+uniform samplerRECT samp0 : register(s0);
+
+void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
+{
+ //variables
+ int internalresolution = 1278;
+ float4 c0 = texRECT(samp0, uv0).rgba;
+ //blur
+ float4 blurtotal = float4(0, 0, 0, 0);
+ float blursize = 1.5;
+ blurtotal += texRECT(samp0, uv0 + float2(-blursize, -blursize));
+ blurtotal += texRECT(samp0, uv0 + float2(-blursize, blursize));
+ blurtotal += texRECT(samp0, uv0 + float2( blursize, -blursize));
+ blurtotal += texRECT(samp0, uv0 + float2( blursize, blursize));
+ blurtotal += texRECT(samp0, uv0 + float2(-blursize, 0));
+ blurtotal += texRECT(samp0, uv0 + float2( blursize, 0));
+ blurtotal += texRECT(samp0, uv0 + float2( 0, -blursize));
+ blurtotal += texRECT(samp0, uv0 + float2( 0, blursize));
+ blurtotal *= 0.125;
+ c0 = blurtotal;
+ //greyscale
+ float grey = ((0.3 * c0.r) + (0.4 * c0.g) + (0.3 * c0.b));
+ // brighten
+ grey = grey * 0.5 + 0.7;
+ // darken edges
+ float x = uv0[0];
+ float y = uv0[1];
+ if (x > internalresolution/2) x = internalresolution-x;
+ if (y > internalresolution/2) y = internalresolution-y;
+ if (x > internalresolution/2*0.95) x = internalresolution/2*0.95;
+ if (y > internalresolution/2*0.95) y = internalresolution/2*0.95;
+ x = -x+641;
+ y = -y+641;
+ /*****inline square root routines*****/
+ // bit of a performance bottleneck.
+ // neccessary to make the darkened area rounded
+ // instead of rhombus-shaped.
+ float sqrt=x/10;
+ while((sqrt*sqrt) < x) sqrt+=0.1;
+ x = sqrt;
+ sqrt=y/10;
+ while((sqrt*sqrt) < y) sqrt+=0.1;
+ y = sqrt;
+ /*****end of inline square root routines*****/
+ x *= 2;
+ y *= 2;
+ grey -= x/200;
+ grey -= y/200;
+ // output
+ ocol0 = float4(0, grey, 0, 1.0);
}
\ No newline at end of file
diff --git a/nightvision2scanlines.txt b/nightvision2scanlines.txt
index 067c8e3873..f84d1e9458 100644
--- a/nightvision2scanlines.txt
+++ b/nightvision2scanlines.txt
@@ -1,56 +1,56 @@
-uniform samplerRECT samp0 : register(s0);
-
-void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
-{
- //variables
- int internalresolution = 1278;
- float4 c0 = texRECT(samp0, uv0).rgba;
- //blur
- float4 blurtotal = float4(0, 0, 0, 0);
- float blursize = 1.5;
- blurtotal += texRECT(samp0, uv0 + float2(-blursize, -blursize));
- blurtotal += texRECT(samp0, uv0 + float2(-blursize, blursize));
- blurtotal += texRECT(samp0, uv0 + float2( blursize, -blursize));
- blurtotal += texRECT(samp0, uv0 + float2( blursize, blursize));
- blurtotal += texRECT(samp0, uv0 + float2(-blursize, 0));
- blurtotal += texRECT(samp0, uv0 + float2( blursize, 0));
- blurtotal += texRECT(samp0, uv0 + float2( 0, -blursize));
- blurtotal += texRECT(samp0, uv0 + float2( 0, blursize));
- blurtotal *= 0.125;
- c0 = blurtotal;
- //greyscale
- float grey = ((0.3 * c0.r) + (0.4 * c0.g) + (0.3 * c0.b));
- // brighten and apply horizontal scanlines
- // This would have been much simpler if I could get the stupid modulo (%) to work
- // If anyone who is more well versed in Cg knows how to do this it'd be slightly more efficient
- // float lineIntensity = ((uv0[1] % 9) - 4) / 40;
- float vPos = uv0[1] / 9;
- float lineIntensity = (((vPos - (int)vPos) * 9) - 4) / 40;
- grey = grey * 0.5 + 0.7 + lineIntensity;
- // darken edges
- float x = uv0[0];
- float y = uv0[1];
- if (x > internalresolution/2) x = internalresolution-x;
- if (y > internalresolution/2) y = internalresolution-y;
- if (x > internalresolution/2*0.95) x = internalresolution/2*0.95;
- if (y > internalresolution/2*0.95) y = internalresolution/2*0.95;
- x = -x+641;
- y = -y+641;
- /*****inline square root routines*****/
- // bit of a performance bottleneck.
- // neccessary to make the darkened area rounded
- // instead of rhombus-shaped.
- float sqrt=x/10;
- while((sqrt*sqrt) < x) sqrt+=0.1;
- x = sqrt;
- sqrt=y/10;
- while((sqrt*sqrt) < y) sqrt+=0.1;
- y = sqrt;
- /*****end of inline square root routines*****/
- x *= 2;
- y *= 2;
- grey -= x/200;
- grey -= y/200;
- // output
- ocol0 = float4(0, grey, 0, 1.0);
+uniform samplerRECT samp0 : register(s0);
+
+void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
+{
+ //variables
+ int internalresolution = 1278;
+ float4 c0 = texRECT(samp0, uv0).rgba;
+ //blur
+ float4 blurtotal = float4(0, 0, 0, 0);
+ float blursize = 1.5;
+ blurtotal += texRECT(samp0, uv0 + float2(-blursize, -blursize));
+ blurtotal += texRECT(samp0, uv0 + float2(-blursize, blursize));
+ blurtotal += texRECT(samp0, uv0 + float2( blursize, -blursize));
+ blurtotal += texRECT(samp0, uv0 + float2( blursize, blursize));
+ blurtotal += texRECT(samp0, uv0 + float2(-blursize, 0));
+ blurtotal += texRECT(samp0, uv0 + float2( blursize, 0));
+ blurtotal += texRECT(samp0, uv0 + float2( 0, -blursize));
+ blurtotal += texRECT(samp0, uv0 + float2( 0, blursize));
+ blurtotal *= 0.125;
+ c0 = blurtotal;
+ //greyscale
+ float grey = ((0.3 * c0.r) + (0.4 * c0.g) + (0.3 * c0.b));
+ // brighten and apply horizontal scanlines
+ // This would have been much simpler if I could get the stupid modulo (%) to work
+ // If anyone who is more well versed in Cg knows how to do this it'd be slightly more efficient
+ // float lineIntensity = ((uv0[1] % 9) - 4) / 40;
+ float vPos = uv0[1] / 9;
+ float lineIntensity = (((vPos - (int)vPos) * 9) - 4) / 40;
+ grey = grey * 0.5 + 0.7 + lineIntensity;
+ // darken edges
+ float x = uv0[0];
+ float y = uv0[1];
+ if (x > internalresolution/2) x = internalresolution-x;
+ if (y > internalresolution/2) y = internalresolution-y;
+ if (x > internalresolution/2*0.95) x = internalresolution/2*0.95;
+ if (y > internalresolution/2*0.95) y = internalresolution/2*0.95;
+ x = -x+641;
+ y = -y+641;
+ /*****inline square root routines*****/
+ // bit of a performance bottleneck.
+ // neccessary to make the darkened area rounded
+ // instead of rhombus-shaped.
+ float sqrt=x/10;
+ while((sqrt*sqrt) < x) sqrt+=0.1;
+ x = sqrt;
+ sqrt=y/10;
+ while((sqrt*sqrt) < y) sqrt+=0.1;
+ y = sqrt;
+ /*****end of inline square root routines*****/
+ x *= 2;
+ y *= 2;
+ grey -= x/200;
+ grey -= y/200;
+ // output
+ ocol0 = float4(0, grey, 0, 1.0);
}
\ No newline at end of file
diff --git a/posterize.txt b/posterize.txt
index fca009b145..f86fb108d4 100644
--- a/posterize.txt
+++ b/posterize.txt
@@ -1,26 +1,26 @@
-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.25)
- {
- red = c0.r;
- }
-
- if (c0.g > 0.25)
- {
- green = c0.g;
- }
-
- if (c0.b > 0.25)
- {
- blue = c0.b;
- }
-
- ocol0 = float4(red, green, blue, 1.0);
+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.25)
+ {
+ red = c0.r;
+ }
+
+ if (c0.g > 0.25)
+ {
+ green = c0.g;
+ }
+
+ if (c0.b > 0.25)
+ {
+ blue = c0.b;
+ }
+
+ ocol0 = float4(red, green, blue, 1.0);
}
\ No newline at end of file
diff --git a/posterize2.txt b/posterize2.txt
index d4df65c929..d621449a72 100644
--- a/posterize2.txt
+++ b/posterize2.txt
@@ -1,21 +1,21 @@
-uniform samplerRECT samp0 : register(s0);
-
-inline float bound(float color)
-{
- if (color < 0.35)
- {
- if (color < 0.25)
- {
- return color;
- }
- return 0.5;
- }
-return 1.0;
-}
-
-void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
-{
- float4 c0 = texRECT(samp0, uv0 + float2(0,0)).rgba;
- ocol0 = float4(bound(c0.r), bound(c0.g), bound(c0.b), c0.a);
-}
-
+uniform samplerRECT samp0 : register(s0);
+
+inline float bound(float color)
+{
+ if (color < 0.35)
+ {
+ if (color < 0.25)
+ {
+ return color;
+ }
+ return 0.5;
+ }
+return 1.0;
+}
+
+void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
+{
+ float4 c0 = texRECT(samp0, uv0 + float2(0,0)).rgba;
+ ocol0 = float4(bound(c0.r), bound(c0.g), bound(c0.b), c0.a);
+}
+
diff --git a/primarycolors.txt b/primarycolors.txt
index 1639b941fa..cdbd3cad3e 100644
--- a/primarycolors.txt
+++ b/primarycolors.txt
@@ -1,69 +1,69 @@
-uniform samplerRECT samp0 : register(s0);
-
-void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
-{
- float4 c0 = texRECT(samp0, uv0).rgba;
- float red = c0.r;
- float blue = c0.b;
- float green = c0.g;
- float factor = 2;
- float max = 0.8;
- float min = 0.3;
-
- if(c0.r > c0.g && c0.b > c0.g){
- if(c0.r < c0.b + 0.05 && c0.b < c0.r + 0.05){
- red = 0.7;
- blue = 0.7;
- green = 0.05;
- }
- else if(c0.r > c0.b + 0.05){
- red = 0.7;
- blue = 0.05;
- green = 0.05;
- }
- else if (c0.b > c0.r + 0.05){
- red = 0.05;
- blue = 0.7;
- green = 0.05;
- }
- }
-
- if(c0.r > c0.b && c0.g > c0.b){
- if(c0.r < c0.g + 0.05 && c0.g < c0.r + 0.05){
- red = 0.7;
- blue = 0.05;
- green = 0.7;
- }
- else if(c0.r > c0.g + 0.05){
- red = 0.7;
- blue = 0.05;
- green = 0.05;
- }
- else if (c0.g > c0.r + 0.05){
- red = 0.05;
- blue = 0.05;
- green = 0.7;
- }
- }
-
- if(c0.g > c0.r && c0.b > c0.r){
- if(c0.g < c0.b + 0.05 && c0.b < c0.g + 0.05){
- red = 0.05;
- blue = 0.7;
- green = 0.7;
- }
- else if(c0.g > c0.b + 0.05){
- red = 0.05;
- blue = 0.05;
- green = 0.7;
- }
- else if (c0.b > c0.g + 0.05){
- red = 0.05;
- blue = 0.7;
- green = 0.05;
- }
- }
-
-
- ocol0 = float4(red, green, blue, c0.a);
+uniform samplerRECT samp0 : register(s0);
+
+void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
+{
+ float4 c0 = texRECT(samp0, uv0).rgba;
+ float red = c0.r;
+ float blue = c0.b;
+ float green = c0.g;
+ float factor = 2;
+ float max = 0.8;
+ float min = 0.3;
+
+ if(c0.r > c0.g && c0.b > c0.g){
+ if(c0.r < c0.b + 0.05 && c0.b < c0.r + 0.05){
+ red = 0.7;
+ blue = 0.7;
+ green = 0.05;
+ }
+ else if(c0.r > c0.b + 0.05){
+ red = 0.7;
+ blue = 0.05;
+ green = 0.05;
+ }
+ else if (c0.b > c0.r + 0.05){
+ red = 0.05;
+ blue = 0.7;
+ green = 0.05;
+ }
+ }
+
+ if(c0.r > c0.b && c0.g > c0.b){
+ if(c0.r < c0.g + 0.05 && c0.g < c0.r + 0.05){
+ red = 0.7;
+ blue = 0.05;
+ green = 0.7;
+ }
+ else if(c0.r > c0.g + 0.05){
+ red = 0.7;
+ blue = 0.05;
+ green = 0.05;
+ }
+ else if (c0.g > c0.r + 0.05){
+ red = 0.05;
+ blue = 0.05;
+ green = 0.7;
+ }
+ }
+
+ if(c0.g > c0.r && c0.b > c0.r){
+ if(c0.g < c0.b + 0.05 && c0.b < c0.g + 0.05){
+ red = 0.05;
+ blue = 0.7;
+ green = 0.7;
+ }
+ else if(c0.g > c0.b + 0.05){
+ red = 0.05;
+ blue = 0.05;
+ green = 0.7;
+ }
+ else if (c0.b > c0.g + 0.05){
+ red = 0.05;
+ blue = 0.7;
+ green = 0.05;
+ }
+ }
+
+
+ ocol0 = float4(red, green, blue, c0.a);
}
\ No newline at end of file
diff --git a/sepia.txt b/sepia.txt
index f6018e6936..eb7222ce3c 100644
--- a/sepia.txt
+++ b/sepia.txt
@@ -1,13 +1,13 @@
-uniform samplerRECT samp0 : register(s0);
-
-void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
-{
- float4 c0 = texRECT(samp0, uv0).rgba;
- // Same coefficients as grayscale2 at this point
- float avg = (0.222 * c0.r) + (0.707 * c0.g) + (0.071 * c0.b);
- float red=avg;
- // Not sure about these coefficients, they just seem to produce the proper yellow
- float green=avg*.75;
- float blue=avg*.5;
- ocol0 = float4(red, green, blue, c0.a);
+uniform samplerRECT samp0 : register(s0);
+
+void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
+{
+ float4 c0 = texRECT(samp0, uv0).rgba;
+ // Same coefficients as grayscale2 at this point
+ float avg = (0.222 * c0.r) + (0.707 * c0.g) + (0.071 * c0.b);
+ float red=avg;
+ // Not sure about these coefficients, they just seem to produce the proper yellow
+ float green=avg*.75;
+ float blue=avg*.5;
+ ocol0 = float4(red, green, blue, c0.a);
}
\ No newline at end of file
diff --git a/sketchy.txt b/sketchy.txt
index 76f861c453..536baff594 100644
--- a/sketchy.txt
+++ b/sketchy.txt
@@ -1,17 +1,17 @@
-uniform samplerRECT samp0 : register(s0);
-
-void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
-{
- float4 c0 = texRECT(samp0, uv0).rgba;
- float4 tmp = float4(0, 0, 0, 0);
- tmp += c0 - texRECT(samp0, uv0 + float2(2, 2)).rgba;
- tmp += c0 - texRECT(samp0, uv0 - float2(2, 2)).rgba;
- tmp += c0 - texRECT(samp0, uv0 + float2(2, -2)).rgba;
- tmp += c0 - texRECT(samp0, uv0 - float2(2, -2)).rgba;
- float grey = ((0.222 * tmp.r) + (0.707 * tmp.g) + (0.071 * tmp.b));
- // get rid of the bottom line, as it is incorrect.
- if (uv0[1] < 163)
- tmp = 1;
- c0 = c0+1-grey*7;
- ocol0 = float4(c0.r, c0.g, c0.b, 1);
+uniform samplerRECT samp0 : register(s0);
+
+void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
+{
+ float4 c0 = texRECT(samp0, uv0).rgba;
+ float4 tmp = float4(0, 0, 0, 0);
+ tmp += c0 - texRECT(samp0, uv0 + float2(2, 2)).rgba;
+ tmp += c0 - texRECT(samp0, uv0 - float2(2, 2)).rgba;
+ tmp += c0 - texRECT(samp0, uv0 + float2(2, -2)).rgba;
+ tmp += c0 - texRECT(samp0, uv0 - float2(2, -2)).rgba;
+ float grey = ((0.222 * tmp.r) + (0.707 * tmp.g) + (0.071 * tmp.b));
+ // get rid of the bottom line, as it is incorrect.
+ if (uv0[1] < 163)
+ tmp = 1;
+ c0 = c0+1-grey*7;
+ ocol0 = float4(c0.r, c0.g, c0.b, 1);
}
\ No newline at end of file
diff --git a/spookey1.txt b/spookey1.txt
index cbfe6b0558..4d9660dcd0 100644
--- a/spookey1.txt
+++ b/spookey1.txt
@@ -1,20 +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 blue = 0.0;
-
- if (c0.r < 0.35 || c0.b > 0.5)
- {
- red = c0.g + c0.b;
- }
- else
- {
- red = c0.g + c0.b;
- blue = c0.r + c0.b;
- }
-
- ocol0 = float4(red, 0.0, blue, 1.0);
+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.35 || c0.b > 0.5)
+ {
+ red = c0.g + c0.b;
+ }
+ else
+ {
+ red = c0.g + c0.b;
+ blue = c0.r + c0.b;
+ }
+
+ ocol0 = float4(red, 0.0, blue, 1.0);
}
\ No newline at end of file
diff --git a/spookey2.txt b/spookey2.txt
index 58919ae15d..5e2c1b805f 100644
--- a/spookey2.txt
+++ b/spookey2.txt
@@ -1,22 +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.35 || c0.b > 0.5)
- {
- red = c0.g + c0.b;
- }
- else
- {
- red = c0.g + c0.b;
- blue = c0.r + c0.b;
- green = c0.r + c0.b;
- }
-
- ocol0 = float4(red, green, blue, 1.0);
+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.35 || c0.b > 0.5)
+ {
+ red = c0.g + c0.b;
+ }
+ else
+ {
+ red = c0.g + c0.b;
+ blue = c0.r + c0.b;
+ green = c0.r + c0.b;
+ }
+
+ ocol0 = float4(red, green, blue, 1.0);
}
\ No newline at end of file
diff --git a/stereoscopic.txt b/stereoscopic.txt
index 254db332c0..db8547a992 100644
--- a/stereoscopic.txt
+++ b/stereoscopic.txt
@@ -1,27 +1,27 @@
-// Omega's 3D Stereoscopic filtering
-// TODO: Need depth info!
-
-uniform samplerRECT samp0 : register(s0);
-
-void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
-{
- 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;
- red = max(c0.r, c1.r);
-
- // Right Eye (Cyan)
- float4 c2 = texRECT(samp0, uv0 + float2(-sep,0)).rgba;
- float cyan = (c2.g + c2.b) / 2;
- green = max(c0.g, cyan);
- blue = max(c0.b, cyan);
-
-
- ocol0 = float4(red, green, blue, c0.a);
+// Omega's 3D Stereoscopic filtering
+// TODO: Need depth info!
+
+uniform samplerRECT samp0 : register(s0);
+
+void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
+{
+ 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;
+ red = max(c0.r, c1.r);
+
+ // Right Eye (Cyan)
+ float4 c2 = texRECT(samp0, uv0 + float2(-sep,0)).rgba;
+ float cyan = (c2.g + c2.b) / 2;
+ green = max(c0.g, cyan);
+ blue = max(c0.b, cyan);
+
+
+ ocol0 = float4(red, green, blue, c0.a);
}
\ No newline at end of file
diff --git a/stereoscopic2.txt b/stereoscopic2.txt
index f694aec2e6..b809146403 100644
--- a/stereoscopic2.txt
+++ b/stereoscopic2.txt
@@ -1,26 +1,26 @@
-// Omega's 3D Stereoscopic filtering (Amber/Blue)
-// TODO: Need depth info!
-
-uniform samplerRECT samp0 : register(s0);
-
-void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
-{
- float4 c0 = texRECT(samp0, uv0).rgba; // Source Color
- float sep = 5;
- float red = c0.r;
- float green = c0.g;
- float blue = c0.b;
-
- // Left Eye (Amber)
- float4 c2 = texRECT(samp0, uv0 + float2(sep,0)).rgba;
- float amber = (c2.r + c2.g) / 2;
- red = max(c0.r, amber);
- green = max(c0.g, amber);
-
- // Right Eye (Blue)
- float4 c1 = texRECT(samp0, uv0 + float2(-sep,0)).rgba;
- blue = max(c0.b, c1.b);
-
-
- ocol0 = float4(red, green, blue, c0.a);
+// Omega's 3D Stereoscopic filtering (Amber/Blue)
+// TODO: Need depth info!
+
+uniform samplerRECT samp0 : register(s0);
+
+void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
+{
+ float4 c0 = texRECT(samp0, uv0).rgba; // Source Color
+ float sep = 5;
+ float red = c0.r;
+ float green = c0.g;
+ float blue = c0.b;
+
+ // Left Eye (Amber)
+ float4 c2 = texRECT(samp0, uv0 + float2(sep,0)).rgba;
+ float amber = (c2.r + c2.g) / 2;
+ red = max(c0.r, amber);
+ green = max(c0.g, amber);
+
+ // Right Eye (Blue)
+ float4 c1 = texRECT(samp0, uv0 + float2(-sep,0)).rgba;
+ blue = max(c0.b, c1.b);
+
+
+ ocol0 = float4(red, green, blue, c0.a);
}
\ No newline at end of file
diff --git a/sunset.txt b/sunset.txt
index 5ffc4b9352..c74523543c 100644
--- a/sunset.txt
+++ b/sunset.txt
@@ -1,7 +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(c0.r*1.5, c0.g*1, c0.b*0.5, c0.a);
+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*1.5, c0.g*1, c0.b*0.5, c0.a);
}
\ No newline at end of file
diff --git a/swap_RGB_BGR.txt b/swap_RGB_BGR.txt
index e92562461e..92b848b333 100644
--- a/swap_RGB_BGR.txt
+++ b/swap_RGB_BGR.txt
@@ -1,7 +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(c0.b, c0.g, c0.r, c0.a);
-}
+uniform samplerRECT samp0 : register(s0);
+
+void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
+{
+ float4 c0 = texRECT(samp0, uv0).rgba;
+ ocol0 = float4(c0.b, c0.g, c0.r, c0.a);
+}
diff --git a/swap_RGB_BRG.txt b/swap_RGB_BRG.txt
index dbb2e922eb..3233222d09 100644
--- a/swap_RGB_BRG.txt
+++ b/swap_RGB_BRG.txt
@@ -1,7 +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(c0.b, c0.r, c0.g, c0.a);
+uniform samplerRECT samp0 : register(s0);
+
+void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
+{
+ float4 c0 = texRECT(samp0, uv0).rgba;
+ ocol0 = float4(c0.b, c0.r, c0.g, c0.a);
}
\ No newline at end of file
diff --git a/swap_RGB_GBR.txt b/swap_RGB_GBR.txt
index 5b600714c6..5212032252 100644
--- a/swap_RGB_GBR.txt
+++ b/swap_RGB_GBR.txt
@@ -1,7 +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(c0.g, c0.b, c0.r, c0.a);
+uniform samplerRECT samp0 : register(s0);
+
+void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
+{
+ float4 c0 = texRECT(samp0, uv0).rgba;
+ ocol0 = float4(c0.g, c0.b, c0.r, c0.a);
}
\ No newline at end of file
diff --git a/swap_RGB_GRB.txt b/swap_RGB_GRB.txt
index f195aafbdd..32d7585801 100644
--- a/swap_RGB_GRB.txt
+++ b/swap_RGB_GRB.txt
@@ -1,7 +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(c0.g, c0.r, c0.b, c0.a);
+uniform samplerRECT samp0 : register(s0);
+
+void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
+{
+ float4 c0 = texRECT(samp0, uv0).rgba;
+ ocol0 = float4(c0.g, c0.r, c0.b, c0.a);
}
\ No newline at end of file
diff --git a/swap_RGB_RBG.txt b/swap_RGB_RBG.txt
index 066e4bddc7..85bd5373cf 100644
--- a/swap_RGB_RBG.txt
+++ b/swap_RGB_RBG.txt
@@ -1,7 +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(c0.r, c0.b, c0.g, c0.a);
+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.b, c0.g, c0.a);
}
\ No newline at end of file
diff --git a/toxic.txt b/toxic.txt
index aa38d9477e..4cefcb7898 100644
--- a/toxic.txt
+++ b/toxic.txt
@@ -1,22 +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.3 || c0.b > 0.5)
- {
- blue = c0.r + c0.b;
- red = c0.g + c0.b / 2;
- }
- else
- {
- red = c0.g + c0.b;
- green = c0.r + c0.b;
- }
-
- ocol0 = float4(red, green, blue, 1.0);
+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.3 || c0.b > 0.5)
+ {
+ blue = c0.r + c0.b;
+ red = c0.g + c0.b / 2;
+ }
+ else
+ {
+ red = c0.g + c0.b;
+ green = c0.r + c0.b;
+ }
+
+ ocol0 = float4(red, green, blue, 1.0);
}
\ No newline at end of file