Change all these pp shaders to GLSL.

This commit is contained in:
Ryan Houdek 2013-03-07 10:46:55 -06:00
parent 1c125f0fb4
commit 09e5a7ace7
21 changed files with 311 additions and 274 deletions

View File

@ -1,18 +1,21 @@
uniform samplerRECT samp0 : register(s0);
uniform sampler2D samp9;
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
out vec4 ocol0;
in vec2 uv0;
void main()
{
float4 c0 = texRECT(samp0, uv0).rgba;
float red = 0.0;
float blue = 0.0;
vec4 c0 = texture(samp9, uv0);
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);
if (c0.r > 0.15 && c0.b > 0.15)
{
blue = 0.5;
red = 0.5;
}
ocol0 = float4(red, green, blue, 1.0);
}
float green = max(c0.r + c0.b, c0.g);
ocol0 = vec4(red, green, blue, 1.0);
}

View File

@ -1,8 +1,9 @@
uniform samplerRECT samp0 : register(s0);
uniform sampler2D samp9;
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
out vec4 ocol0;
in vec2 uv0;
void main()
{
float4 c0 = texRECT(samp0, uv0).rgba;
c0 += c0 * 2;
ocol0 = float4(c0.r, c0.g, c0.b, c0.a);
}
ocol0 = texture(samp9, uv0) * 3;
}

View File

@ -1,20 +1,17 @@
uniform samplerRECT samp0 : register(s0);
uniform sampler2D samp9;
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
out vec4 ocol0;
in vec2 uv0;
void main()
{
float4 c0 = texRECT(samp0, uv0).rgba;
float red = 0.0;
float green = 0.0;
vec4 c0 = texture(samp9, uv0);
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);
}
if (c0.r < 0.35 || c0.b > 0.35)
green = c0.g + (c0.b / 2);
else
red = c0.r + 0.4;
ocol0 = vec4(red, green, 0.0, 1.0);
}

View File

@ -1,22 +1,24 @@
uniform samplerRECT samp0 : register(s0);
uniform sampler2D samp9;
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
out vec4 ocol0;
in vec2 uv0;
void main()
{
float4 c0 = texRECT(samp0, uv0).rgba;
float red = 0.0;
float green = 0.0;
float blue = 0.0;
vec4 c0 = texture(samp9, uv0);
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);
}
if (c0.r < 0.50 || c0.b > 0.5)
{
blue = c0.r;
red = c0.g;
}
else
{
blue = c0.r;
green = c0.r;
}
ocol0 = vec4(red, green, blue, 1.0);
}

View File

@ -1,39 +1,36 @@
uniform samplerRECT samp0 : register(s0);
uniform sampler2D samp9;
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
out vec4 ocol0;
in vec2 uv0;
void main()
{
float4 c0 = texRECT(samp0, uv0).rgba;
float red = 0.0;
float green = 0.0;
float blue = 0.0;
vec4 c0 = texture(samp9, uv0);
float red = 0.0;
float green = 0.0;
float blue = 0.0;
red = c0.r;
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.r > 0.0)
if (c0.g > c0.r)
green = (c0.g - (c0.g - c0.r)) / 3;
if (c0.g > 0.0 && c0.r < 0.25)
{
red = c0.g;
green = c0.g / 3;
}
if (c0.b > 0.0 && c0.r < 0.25)
{
red = c0.b;
green = c0.b / 3;
}
if (((c0.r + c0.g + c0.b) / 3) > 0.9)
{
green = c0.r / 3;
}
ocol0 = float4(red, green, blue, 1.0);
}
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 = vec4(red, green, blue, 1.0);
}

View File

@ -1,15 +1,18 @@
uniform samplerRECT samp0 : register(s0);
uniform sampler2D samp9;
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
out vec4 ocol0;
in vec2 uv0;
void main()
{
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;
vec4 c0 = texture(samp9, uv0);
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);
}
red = c0.r + (c0.g / 2) + (c0.b / 3);
green = c0.r / 3;
ocol0 = vec4(red, green, blue, 1.0);
}

View File

@ -1,8 +1,11 @@
uniform samplerRECT samp0 : register(s0);
uniform sampler2D samp9;
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
out vec4 ocol0;
in vec2 uv0;
void main()
{
float4 c0 = texRECT(samp0, uv0).rgba;
float avg = (c0.r + c0.g + c0.b) / 3.0;
ocol0 = float4(avg, avg, avg, c0.a);
vec4 c0 = texture(samp9, uv0);
float avg = (c0.r + c0.g + c0.b) / 3.0;
ocol0 = vec4(avg, avg, avg, c0.a);
}

View File

@ -1,9 +1,12 @@
uniform samplerRECT samp0 : register(s0);
uniform sampler2D samp9;
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
out vec4 ocol0;
in vec2 uv0;
void main()
{
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);
vec4 c0 = texture(samp9, uv0);
// 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 = vec4(avg, avg, avg, c0.a);
}

View File

@ -5,5 +5,5 @@ in vec2 uv0;
void main()
{
ocol0 = vec4(1.0, 1.0, 1.0, 1.0) - texture(samp9, uv0);
ocol0 = vec4(1.0, 1.0, 1.0, 1.0) - texture(samp9, uv0);
}

View File

@ -1,7 +1,9 @@
uniform samplerRECT samp0 : register(s0);
uniform sampler2D samp9;
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
out vec4 ocol0;
in vec2 uv0;
void main()
{
float4 c0 = texRECT(samp0, uv0).rgba;
ocol0 = float4(0.0, 0.0, 0.7, 1.0) - c0;
}
ocol0 = vec4(0.0, 0.0, 0.7, 1.0) - texture(samp9, uv0);
}

View File

@ -1,69 +1,70 @@
uniform samplerRECT samp0 : register(s0);
uniform sampler2D samp9;
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
out vec4 ocol0;
in vec2 uv0;
void main()
{
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;
}
}
vec4 c0 = texture(samp9, uv0);
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.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;
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;
}
}
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;
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;
}
}
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);
}
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 = vec4(red, green, blue, c0.a);
}

View File

@ -1,13 +1,16 @@
uniform samplerRECT samp0 : register(s0);
uniform sampler2D samp9;
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
out vec4 ocol0;
in vec2 uv0;
void main()
{
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);
}
vec4 c0 = texture(samp9, uv0);
// 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 = vec4(red, green, blue, c0.a);
}

View File

@ -1,20 +1,23 @@
uniform samplerRECT samp0 : register(s0);
uniform sampler2D samp9;
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
out vec4 ocol0;
in vec2 uv0;
void main()
{
float4 c0 = texRECT(samp0, uv0).rgba;
float red = 0.0;
float blue = 0.0;
vec4 c0 = texture(samp9, uv0);
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);
}
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 = vec4(red, 0.0, blue, 1.0);
}

View File

@ -1,22 +1,25 @@
uniform samplerRECT samp0 : register(s0);
uniform sampler2D samp9;
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
out vec4 ocol0;
in vec2 uv0;
void main()
{
float4 c0 = texRECT(samp0, uv0).rgba;
float red = 0.0;
float green = 0.0;
float blue = 0.0;
vec4 c0 = texture(samp9, uv0);
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);
}
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 = vec4(red, green, blue, 1.0);
}

View File

@ -1,7 +1,10 @@
uniform samplerRECT samp0 : register(s0);
uniform sampler2D samp9;
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
out vec4 ocol0;
in vec2 uv0;
void main()
{
float4 c0 = texRECT(samp0, uv0).rgba;
ocol0 = float4(c0.r*1.5, c0.g*1, c0.b*0.5, c0.a);
}
vec4 c0 = texture(samp9, uv0);
ocol0 = vec4(c0.r * 1.5, c0.g * 1, c0.b * 0.5, c0.a);
}

View File

@ -1,7 +1,9 @@
uniform samplerRECT samp0 : register(s0);
uniform sampler2D samp9;
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
out vec4 ocol0;
in vec2 uv0;
void main()
{
float4 c0 = texRECT(samp0, uv0).rgba;
ocol0 = float4(c0.b, c0.g, c0.r, c0.a);
ocol0 = texture(samp9, uv0).bgra;
}

View File

@ -1,7 +1,9 @@
uniform samplerRECT samp0 : register(s0);
uniform sampler2D samp9;
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
out vec4 ocol0;
in vec2 uv0;
void main()
{
float4 c0 = texRECT(samp0, uv0).rgba;
ocol0 = float4(c0.b, c0.r, c0.g, c0.a);
}
ocol0 = texture(samp9, uv0).brga;
}

View File

@ -1,7 +1,9 @@
uniform samplerRECT samp0 : register(s0);
uniform sampler2D samp9;
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
out vec4 ocol0;
in vec2 uv0;
void main()
{
float4 c0 = texRECT(samp0, uv0).rgba;
ocol0 = float4(c0.g, c0.b, c0.r, c0.a);
}
ocol0 = texture(samp9, uv0).gbra;
}

View File

@ -1,7 +1,9 @@
uniform samplerRECT samp0 : register(s0);
uniform sampler2D samp9;
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
out vec4 ocol0;
in vec2 uv0;
void main()
{
float4 c0 = texRECT(samp0, uv0).rgba;
ocol0 = float4(c0.g, c0.r, c0.b, c0.a);
}
ocol0 = texture(samp9, uv0).grba;
}

View File

@ -1,7 +1,9 @@
uniform samplerRECT samp0 : register(s0);
uniform sampler2D samp9;
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
out vec4 ocol0;
in vec2 uv0;
void main()
{
float4 c0 = texRECT(samp0, uv0).rgba;
ocol0 = float4(c0.r, c0.b, c0.g, c0.a);
}
ocol0 = texture(samp9, uv0).rbga;
}

View File

@ -1,22 +1,25 @@
uniform samplerRECT samp0 : register(s0);
uniform sampler2D samp9;
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
out vec4 ocol0;
in vec2 uv0;
void main()
{
float4 c0 = texRECT(samp0, uv0).rgba;
float red = 0.0;
float green = 0.0;
float blue = 0.0;
vec4 c0 = texture(samp9, uv0);
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);
}
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 = vec4(red, green, blue, 1.0);
}