From f8c01efece74d1eaec91f560d6f13c6782bbaba8 Mon Sep 17 00:00:00 2001 From: MofoMan2000 Date: Sat, 23 Oct 2010 22:19:23 +0000 Subject: [PATCH] Rename color_swap_1 to swap_rgb_gbr because that's what it does. Rename sunset to swap_rgb_bgr because that's what IT does Rename sunset2 to sunset since we no longer have two sunsets Add the rest of the RGB swap permutations. This clearly labels all the simple color swapping shaders and puts them in an easy-to-find place.Rename color_swap_1 to swap_rgb_gbr because that's what it does. Rename sunset to swap_rgb_bgr because that's what IT does Rename sunset2 to sunset since we no longer have two sunsets Add the rest of the RGB swap permutations. This clearly labels all the simple color swapping shaders and puts them in an easy-to-find place. I hope this was all the color swap shaders, if not it can be corrected easily. Also added small documentation to sepia. --- sepia.txt | 1 + sunset.txt | 4 ++-- sunset2.txt => swap_RGB_BGR.txt | 4 ++-- color_swap_1.txt => swap_RGB_BRG.txt | 2 +- swap_RGB_GBR.txt | 7 +++++++ swap_RGB_GRB.txt | 7 +++++++ swap_RGB_RBG.txt | 7 +++++++ 7 files changed, 27 insertions(+), 5 deletions(-) rename sunset2.txt => swap_RGB_BGR.txt (71%) rename color_swap_1.txt => swap_RGB_BRG.txt (75%) create mode 100644 swap_RGB_GBR.txt create mode 100644 swap_RGB_GRB.txt create mode 100644 swap_RGB_RBG.txt diff --git a/sepia.txt b/sepia.txt index 15557c8923..f6018e6936 100644 --- a/sepia.txt +++ b/sepia.txt @@ -6,6 +6,7 @@ void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0) // 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); diff --git a/sunset.txt b/sunset.txt index e92562461e..5ffc4b9352 100644 --- a/sunset.txt +++ b/sunset.txt @@ -3,5 +3,5 @@ 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); -} + ocol0 = float4(c0.r*1.5, c0.g*1, c0.b*0.5, c0.a); +} \ No newline at end of file diff --git a/sunset2.txt b/swap_RGB_BGR.txt similarity index 71% rename from sunset2.txt rename to swap_RGB_BGR.txt index 5ffc4b9352..e92562461e 100644 --- a/sunset2.txt +++ b/swap_RGB_BGR.txt @@ -3,5 +3,5 @@ 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 + ocol0 = float4(c0.b, c0.g, c0.r, c0.a); +} diff --git a/color_swap_1.txt b/swap_RGB_BRG.txt similarity index 75% rename from color_swap_1.txt rename to swap_RGB_BRG.txt index 68debd6837..dbb2e922eb 100644 --- a/color_swap_1.txt +++ b/swap_RGB_BRG.txt @@ -3,5 +3,5 @@ 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, 1.0); + 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 new file mode 100644 index 0000000000..5b600714c6 --- /dev/null +++ b/swap_RGB_GBR.txt @@ -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(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 new file mode 100644 index 0000000000..f195aafbdd --- /dev/null +++ b/swap_RGB_GRB.txt @@ -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(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 new file mode 100644 index 0000000000..066e4bddc7 --- /dev/null +++ b/swap_RGB_RBG.txt @@ -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(c0.r, c0.b, c0.g, c0.a); +} \ No newline at end of file