diff --git a/Data/User/Shaders/acidmetal.txt b/Data/User/Shaders/acidmetal.txt index c3fed07f7c..d52efb35a2 100644 --- a/Data/User/Shaders/acidmetal.txt +++ b/Data/User/Shaders/acidmetal.txt @@ -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); -} \ No newline at end of file + float green = max(c0.r + c0.b, c0.g); + + ocol0 = vec4(red, green, blue, 1.0); +} diff --git a/Data/User/Shaders/brighten.txt b/Data/User/Shaders/brighten.txt index ceb877b3b5..120d633f83 100644 --- a/Data/User/Shaders/brighten.txt +++ b/Data/User/Shaders/brighten.txt @@ -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); -} \ No newline at end of file + ocol0 = texture(samp9, uv0) * 3; +} diff --git a/Data/User/Shaders/chrismas.txt b/Data/User/Shaders/chrismas.txt index abc8c1a76f..3ae8ba56b3 100644 --- a/Data/User/Shaders/chrismas.txt +++ b/Data/User/Shaders/chrismas.txt @@ -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); -} \ No newline at end of file + 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); +} diff --git a/Data/User/Shaders/cool1.txt b/Data/User/Shaders/cool1.txt index 0a4cd9a65d..22086fe13c 100644 --- a/Data/User/Shaders/cool1.txt +++ b/Data/User/Shaders/cool1.txt @@ -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); -} \ No newline at end of file + 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); +} diff --git a/Data/User/Shaders/fire.txt b/Data/User/Shaders/fire.txt index bf96247e46..93bc4ec9db 100644 --- a/Data/User/Shaders/fire.txt +++ b/Data/User/Shaders/fire.txt @@ -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); -} \ No newline at end of file + 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); +} diff --git a/Data/User/Shaders/fire2.txt b/Data/User/Shaders/fire2.txt index 899235c326..a6fe76015c 100644 --- a/Data/User/Shaders/fire2.txt +++ b/Data/User/Shaders/fire2.txt @@ -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); -} \ No newline at end of file + red = c0.r + (c0.g / 2) + (c0.b / 3); + green = c0.r / 3; + + ocol0 = vec4(red, green, blue, 1.0); +} diff --git a/Data/User/Shaders/grayscale.txt b/Data/User/Shaders/grayscale.txt index 7a654c3458..7a828f0a11 100644 --- a/Data/User/Shaders/grayscale.txt +++ b/Data/User/Shaders/grayscale.txt @@ -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); } diff --git a/Data/User/Shaders/grayscale2.txt b/Data/User/Shaders/grayscale2.txt index dd3a891e2b..d9ef25a416 100644 --- a/Data/User/Shaders/grayscale2.txt +++ b/Data/User/Shaders/grayscale2.txt @@ -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); } diff --git a/Data/User/Shaders/invert.txt b/Data/User/Shaders/invert.txt index 0a650050bd..67c5dee997 100644 --- a/Data/User/Shaders/invert.txt +++ b/Data/User/Shaders/invert.txt @@ -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); } diff --git a/Data/User/Shaders/invert_blue.txt b/Data/User/Shaders/invert_blue.txt index c52e69da46..aa4eeea43a 100644 --- a/Data/User/Shaders/invert_blue.txt +++ b/Data/User/Shaders/invert_blue.txt @@ -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; -} \ No newline at end of file + ocol0 = vec4(0.0, 0.0, 0.7, 1.0) - texture(samp9, uv0); +} diff --git a/Data/User/Shaders/primarycolors.txt b/Data/User/Shaders/primarycolors.txt index cdbd3cad3e..c54eda5cd4 100644 --- a/Data/User/Shaders/primarycolors.txt +++ b/Data/User/Shaders/primarycolors.txt @@ -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); -} \ No newline at end of file + 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); +} diff --git a/Data/User/Shaders/sepia.txt b/Data/User/Shaders/sepia.txt index eb7222ce3c..88f5c15de7 100644 --- a/Data/User/Shaders/sepia.txt +++ b/Data/User/Shaders/sepia.txt @@ -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); -} \ No newline at end of file + 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); +} diff --git a/Data/User/Shaders/spookey1.txt b/Data/User/Shaders/spookey1.txt index 4d9660dcd0..6a25d57e5e 100644 --- a/Data/User/Shaders/spookey1.txt +++ b/Data/User/Shaders/spookey1.txt @@ -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); -} \ No newline at end of file + 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); +} diff --git a/Data/User/Shaders/spookey2.txt b/Data/User/Shaders/spookey2.txt index 5e2c1b805f..9a56bd21a1 100644 --- a/Data/User/Shaders/spookey2.txt +++ b/Data/User/Shaders/spookey2.txt @@ -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); -} \ No newline at end of file + 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); +} diff --git a/Data/User/Shaders/sunset.txt b/Data/User/Shaders/sunset.txt index c74523543c..4a1eae5a4b 100644 --- a/Data/User/Shaders/sunset.txt +++ b/Data/User/Shaders/sunset.txt @@ -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); -} \ No newline at end of file + vec4 c0 = texture(samp9, uv0); + ocol0 = vec4(c0.r * 1.5, c0.g * 1, c0.b * 0.5, c0.a); +} diff --git a/Data/User/Shaders/swap_RGB_BGR.txt b/Data/User/Shaders/swap_RGB_BGR.txt index 92b848b333..011411700a 100644 --- a/Data/User/Shaders/swap_RGB_BGR.txt +++ b/Data/User/Shaders/swap_RGB_BGR.txt @@ -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; } diff --git a/Data/User/Shaders/swap_RGB_BRG.txt b/Data/User/Shaders/swap_RGB_BRG.txt index 3233222d09..82fe665b12 100644 --- a/Data/User/Shaders/swap_RGB_BRG.txt +++ b/Data/User/Shaders/swap_RGB_BRG.txt @@ -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); -} \ No newline at end of file + ocol0 = texture(samp9, uv0).brga; +} diff --git a/Data/User/Shaders/swap_RGB_GBR.txt b/Data/User/Shaders/swap_RGB_GBR.txt index 5212032252..5884ccd0ab 100644 --- a/Data/User/Shaders/swap_RGB_GBR.txt +++ b/Data/User/Shaders/swap_RGB_GBR.txt @@ -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); -} \ No newline at end of file + ocol0 = texture(samp9, uv0).gbra; +} diff --git a/Data/User/Shaders/swap_RGB_GRB.txt b/Data/User/Shaders/swap_RGB_GRB.txt index 32d7585801..26a4c14f8d 100644 --- a/Data/User/Shaders/swap_RGB_GRB.txt +++ b/Data/User/Shaders/swap_RGB_GRB.txt @@ -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); -} \ No newline at end of file + ocol0 = texture(samp9, uv0).grba; +} diff --git a/Data/User/Shaders/swap_RGB_RBG.txt b/Data/User/Shaders/swap_RGB_RBG.txt index 85bd5373cf..8e735a7337 100644 --- a/Data/User/Shaders/swap_RGB_RBG.txt +++ b/Data/User/Shaders/swap_RGB_RBG.txt @@ -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); -} \ No newline at end of file + ocol0 = texture(samp9, uv0).rbga; +} diff --git a/Data/User/Shaders/toxic.txt b/Data/User/Shaders/toxic.txt index 4cefcb7898..38017c400d 100644 --- a/Data/User/Shaders/toxic.txt +++ b/Data/User/Shaders/toxic.txt @@ -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); -} \ No newline at end of file + 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); +}