diff options
| author | Pierre Bourdon <delroth@gmail.com> | 2013-09-12 02:40:17 +0200 |
|---|---|---|
| committer | Pierre Bourdon <delroth@gmail.com> | 2013-09-14 06:08:30 +0200 |
| commit | e7213ca4b16593b676031802dd353a14a77c8a60 (patch) | |
| tree | 93753bce891a43dbf0edf6fe241a98cf8bcd35c0 /Data/User | |
| parent | 6bdb6585d6174415105f335b3982fbc7e39fb560 (diff) | |
Overlay the user Shaders/ over the shared one to avoid copying files
Diffstat (limited to 'Data/User')
43 files changed, 0 insertions, 1217 deletions
diff --git a/Data/User/Shaders/16bit.txt b/Data/User/Shaders/16bit.txt deleted file mode 100644 index 82a00d3d58..0000000000 --- a/Data/User/Shaders/16bit.txt +++ /dev/null @@ -1,61 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -uniform vec4 resolution; - -void main() -{ - //Change this number to increase the pixel size. - float pixelSize = 3; - - float red = 0.0; - float green = 0.0; - float blue = 0.0; - - vec2 pos = floor(uv0 * resolution.xy / pixelSize) * pixelSize * resolution.zw; - - vec4 c0 = texture(samp9, pos); - - if (c0.r < 0.1) - red = 0.1; - else if (c0.r < 0.20) - red = 0.20; - else if (c0.r < 0.40) - red = 0.40; - else if (c0.r < 0.60) - red = 0.60; - else if (c0.r < 0.80) - red = 0.80; - else - red = 1.0; - - if (c0.b < 0.1) - blue = 0.1; - else if (c0.b < 0.20) - blue = 0.20; - else if (c0.b < 0.40) - blue = 0.40; - else if (c0.b < 0.60) - blue = 0.60; - else if (c0.b < 0.80) - blue = 0.80; - else - blue = 1.0; - - if (c0.g < 0.1) - green = 0.1; - else if (c0.g < 0.20) - green = 0.20; - else if (c0.g < 0.40) - green = 0.40; - else if (c0.g < 0.60) - green = 0.60; - else if (c0.g < 0.80) - green = 0.80; - else - green = 1.0; - - ocol0 = vec4(red, green, blue, c0.a); -}
\ No newline at end of file diff --git a/Data/User/Shaders/32bit.txt b/Data/User/Shaders/32bit.txt deleted file mode 100644 index 859371171b..0000000000 --- a/Data/User/Shaders/32bit.txt +++ /dev/null @@ -1,86 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -uniform vec4 resolution; - -void main() -{ - //Change this number to increase the pixel size. - float pixelSize = 2; - - float red = 0.0; - float green = 0.0; - float blue = 0.0; - - vec2 pos = floor(uv0 * resolution.xy / pixelSize) * pixelSize * resolution.zw; - - vec4 c0 = texture(samp9, pos); - - if (c0.r < 0.06) - red = 0.06; - else if (c0.r < 0.13) - red = 0.13; - else if (c0.r < 0.26) - red = 0.26; - else if (c0.r < 0.33) - red = 0.33; - else if (c0.r < 0.46) - red = 0.46; - else if (c0.r < 0.60) - red = 0.60; - else if (c0.r < 0.73) - red = 0.73; - else if (c0.r < 0.80) - red = 0.80; - else if (c0.r < 0.93) - red = 0.93; - else - red = 1.0; - - if (c0.b < 0.06) - blue = 0.06; - else if (c0.b < 0.13) - blue = 0.13; - else if (c0.b < 0.26) - blue = 0.26; - else if (c0.b < 0.33) - blue = 0.33; - else if (c0.b < 0.46) - blue = 0.46; - else if (c0.b < 0.60) - blue = 0.60; - else if (c0.b < 0.73) - blue = 0.73; - else if (c0.b < 0.80) - blue = 0.80; - else if( c0.b < 0.93) - blue = 0.93; - else - blue = 1.0; - - - if (c0.g < 0.06) - green = 0.06; - else if (c0.g < 0.13) - green = 0.13; - else if (c0.g < 0.26) - green = 0.26; - else if (c0.g < 0.33) - green = 0.33; - else if (c0.g < 0.46) - green = 0.46; - else if (c0.g < 0.60) - green = 0.60; - else if (c0.g < 0.73) - green = 0.73; - else if (c0.g < 0.80) - green = 0.80; - else if( c0.g < 0.93) - green = 0.93; - else - green = 1.0; - - ocol0 = vec4(red, green, blue, c0.a); -}
\ No newline at end of file diff --git a/Data/User/Shaders/README.txt b/Data/User/Shaders/README.txt deleted file mode 100644 index 6913f9d099..0000000000 --- a/Data/User/Shaders/README.txt +++ /dev/null @@ -1,18 +0,0 @@ -//dummy shader: -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -void main() -{ - ocol0 = texture(samp9, uv0); -} - -/* -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... -*/
\ No newline at end of file diff --git a/Data/User/Shaders/acidmetal.txt b/Data/User/Shaders/acidmetal.txt deleted file mode 100644 index d52efb35a2..0000000000 --- a/Data/User/Shaders/acidmetal.txt +++ /dev/null @@ -1,21 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -void main() -{ - 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); - - ocol0 = vec4(red, green, blue, 1.0); -} diff --git a/Data/User/Shaders/acidtrip.txt b/Data/User/Shaders/acidtrip.txt deleted file mode 100644 index f92c85444e..0000000000 --- a/Data/User/Shaders/acidtrip.txt +++ /dev/null @@ -1,11 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -uniform vec4 resolution; - -void main() -{ - ocol0 = (texture(samp9, uv0+resolution.zw) - texture(samp9, uv0-resolution.zw))*8; -} diff --git a/Data/User/Shaders/acidtrip2.txt b/Data/User/Shaders/acidtrip2.txt deleted file mode 100644 index d3de926ff9..0000000000 --- a/Data/User/Shaders/acidtrip2.txt +++ /dev/null @@ -1,13 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -uniform vec4 resolution; - -void main() -{ - vec4 a = texture(samp9, uv0+resolution.zw); - vec4 b = texture(samp9, uv0-resolution.zw); - ocol0 = ( a*a*1.3 - b )*8; -} diff --git a/Data/User/Shaders/asciiart.txt b/Data/User/Shaders/asciiart.txt deleted file mode 100644 index 3f9ff03966..0000000000 --- a/Data/User/Shaders/asciiart.txt +++ /dev/null @@ -1,95 +0,0 @@ -uniform sampler2D samp8; // textures -uniform sampler2D samp9; - -const int char_width = 8; -const int char_height = 13; -const int char_count = 95; -const int char_pixels = char_width*char_height; -const vec2 char_dim = vec2(char_width, char_height); -const vec2 font_scale = vec2(1.0/char_width/char_count, 1.0/char_height); - -out vec4 ocol0; -in vec2 uv0; - -uniform vec4 resolution; - -void main() -{ - vec2 char_pos = floor(uv0*resolution.xy/char_dim); - vec2 pixel_offset = floor(uv0*resolution.xy) - char_pos*char_dim; - - float mindiff = char_width*char_height*100; // just a big number - float minc = 0.0; - vec4 mina = vec4(0.0, 0.0, 0.0, 0.0); - vec4 minb = vec4(0.0, 0.0, 0.0, 0.0); - - for(int i=0; i<char_count; i++) { - vec4 ff = vec4(0.0, 0.0, 0.0, 0.0); - vec4 f = vec4(0.0, 0.0, 0.0, 0.0); - vec4 ft = vec4(0.0, 0.0, 0.0, 0.0); - vec4 t = vec4(0.0, 0.0, 0.0, 0.0); - vec4 tt = vec4(0.0, 0.0, 0.0, 0.0); - - for(int x=0; x<char_width; x++) { - for(int y=0; y<char_height; y++) { - - vec2 tex_pos = char_pos*char_dim + vec2(x,y) + 0.5; - vec4 tex = texture(samp9, tex_pos * resolution.zw); - - vec2 font_pos = vec2(x+i*char_width, y) + 0.5; - vec4 font = texture(samp8, font_pos * font_scale); - - // generates sum of texture and font and their squares - ff += font*font; - f += font; - ft += font*tex; - t += tex; - tt += tex*tex; - } - } - - /* - The next lines are a bit harder, hf :-) - - The idea is to find the perfect char with the perfect background color and the perfect font color. - As this is an equation with three unknowns, we can't just try all chars and color combinations. - - As criterion how "perfect" the selection is, we compare the "mean squared error" of the resulted colors of all chars. - So, now the big issue: how to calculate the MSE without knowing the two colors ... - - In the next steps, "a" is the font color, "b" is the background color, "f" is the font value at this pixel, "t" is the texture value - - So the square error of one pixel is: - e = ( t - a⋅f - b⋅(1-f) ) ^ 2 - - In longer: - e = a^2⋅f^2 - 2⋅a⋅b⋅f^2 + 2⋅a⋅b⋅f - 2⋅a⋅f⋅t + b^2⋅f^2 - 2⋅b^2⋅f + b^2 + 2⋅b⋅f⋅t - 2⋅b⋅t + t^2 - - The sum of all errors is: (as shortcut, ff,f,ft,t,tt are now the sums like declared above, sum(1) is the count of pixels) - sum(e) = a^2⋅ff - 2⋅a^2⋅ff + 2⋅a⋅b⋅f - 2⋅a⋅ft + b^2⋅ff - 2⋅b^2⋅f + b^2⋅sum(1) + 2⋅b⋅ft - 2⋅b⋅t + tt - - To find the minimum, we have to derive this by "a" and "b": - d/da sum(e) = 2⋅a⋅ff + 2⋅b⋅f - 2⋅b⋅ff - 2⋅ft - d/db sum(e) = 2⋅a⋅f - 2⋅a⋅ff - 4⋅b⋅f + 2⋅b⋅ff + 2⋅b⋅sum(1) + 2⋅ft - 2⋅t - - So, both equations must be zero at minimum and there is only one solution. - */ - vec4 a = (f*ft - ff*t + f*t - ft*char_pixels) / (f*f - ff*char_pixels); - vec4 b = (f*ft - ff*t) / (f*f - ff*char_pixels); - - vec4 diff = a*a*ff + 2.0*a*b*f - 2.0*a*b*ff - 2.0*a*ft + b*b *(-2.0*f + ff + char_pixels) + 2.0*b*ft - 2.0*b*t + tt; - float diff_f = dot(diff, vec4(1.0, 1.0, 1.0, 1.0)); - - if(diff_f < mindiff) { - mindiff = diff_f; - minc = i; - mina = a; - minb = b; - } - } - - vec2 font_pos_res = vec2(minc*char_width, 0) + pixel_offset + 0.5; - - vec4 col = texture(samp8, font_pos_res * font_scale); - ocol0 = mina * col + minb * (vec4(1.0,1.0,1.0,1.0) - col); -}
\ No newline at end of file diff --git a/Data/User/Shaders/auto_toon.txt b/Data/User/Shaders/auto_toon.txt deleted file mode 100644 index a3c46730cc..0000000000 --- a/Data/User/Shaders/auto_toon.txt +++ /dev/null @@ -1,22 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -uniform vec4 resolution; - -void main() -{ - vec4 to_gray = vec4(0.3,0.59,0.11,0); - - float x1 = dot(to_gray, texture(samp9, uv0+vec2(1,1)*resolution.zw)); - float x0 = dot(to_gray, texture(samp9, uv0+vec2(-1,-1)*resolution.zw)); - float x3 = dot(to_gray, texture(samp9, uv0+vec2(1,-1)*resolution.zw)); - float x2 = dot(to_gray, texture(samp9, uv0+vec2(-1,1)*resolution.zw)); - - float edge = (x1 - x0) * (x1 - x0) + (x3 - x2) * (x3 - x2); - - float4 color = texture(samp9, uv0).rgba; - - ocol0 = color - vec4(edge, edge, edge, edge) * 12.0; -} diff --git a/Data/User/Shaders/auto_toon2.txt b/Data/User/Shaders/auto_toon2.txt deleted file mode 100644 index d548e70a04..0000000000 --- a/Data/User/Shaders/auto_toon2.txt +++ /dev/null @@ -1,92 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -uniform vec4 resolution; - -void main() -{ - //Changethis to increase the number of colors. - int numColors =8; - - float4 to_gray = float4(0.3,0.59,0.11,0); - float x1 = dot(to_gray, texture(samp9, uv0+vec2(1,1)*resolution.zw)); - float x0 = dot(to_gray, texture(samp9, uv0+vec2(-1,-1)*resolution.zw)); - float x3 = dot(to_gray, texture(samp9, uv0+vec2(1,-1)*resolution.zw)); - float x2 = dot(to_gray, texture(samp9, uv0+vec2(-1,1)*resolution.zw)); - float edge = (x1 - x0) * (x1 - x0) + (x3 - x2) * (x3 - x2); - float4 color = texture(samp9, uv0).rgba; - - float4 c0 = color - float4(edge, edge, edge, edge) * 12; - - - - float red = 0.0; - float green = 0.0; - float blue = 0.0; - bool rr = false; - bool bb = false; - bool gg = false; - int count = 1; - - float colorN = 0.0; - float colorB = 0.0; - - - 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/Data/User/Shaders/bad_bloom.txt b/Data/User/Shaders/bad_bloom.txt deleted file mode 100644 index 79a0b46e4f..0000000000 --- a/Data/User/Shaders/bad_bloom.txt +++ /dev/null @@ -1,43 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -uniform vec4 resolution; - -void main() -{ - float4 c_center = texture(samp9, uv0); - - float4 bloom_sum = float4(0.0, 0.0, 0.0, 0.0); - vec2 pos = uv0 + float2(0.3, 0.3) * resolution.zw; - float2 radius1 = 1.3 * resolution.zw; - bloom_sum += texture(samp9, pos + float2(-1.5, -1.5) * radius1); - bloom_sum += texture(samp9, pos + float2(-2.5, 0) * radius1); - bloom_sum += texture(samp9, pos + float2(-1.5, 1.5) * radius1); - bloom_sum += texture(samp9, pos + float2(0, 2.5) * radius1); - bloom_sum += texture(samp9, pos + float2(1.5, 1.5) * radius1); - bloom_sum += texture(samp9, pos + float2(2.5, 0) * radius1); - bloom_sum += texture(samp9, pos + float2(1.5, -1.5) * radius1); - bloom_sum += texture(samp9, pos + float2(0, -2.5) * radius1); - - float2 radius2 = 4.6 * resolution.zw; - bloom_sum += texture(samp9, pos + float2(-1.5, -1.5) * radius2); - bloom_sum += texture(samp9, pos + float2(-2.5, 0) * radius2); - bloom_sum += texture(samp9, pos + float2(-1.5, 1.5) * radius2); - bloom_sum += texture(samp9, pos + float2(0, 2.5) * radius2); - bloom_sum += texture(samp9, pos + float2(1.5, 1.5) * radius2); - bloom_sum += texture(samp9, pos + float2(2.5, 0) * radius2); - bloom_sum += texture(samp9, pos + float2(1.5, -1.5) * radius2); - bloom_sum += texture(samp9, pos + 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 = (uv0 - 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/Data/User/Shaders/brighten.txt b/Data/User/Shaders/brighten.txt deleted file mode 100644 index 120d633f83..0000000000 --- a/Data/User/Shaders/brighten.txt +++ /dev/null @@ -1,9 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -void main() -{ - ocol0 = texture(samp9, uv0) * 3; -} diff --git a/Data/User/Shaders/chrismas.txt b/Data/User/Shaders/chrismas.txt deleted file mode 100644 index 3ae8ba56b3..0000000000 --- a/Data/User/Shaders/chrismas.txt +++ /dev/null @@ -1,17 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -void main() -{ - 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 = 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 deleted file mode 100644 index 22086fe13c..0000000000 --- a/Data/User/Shaders/cool1.txt +++ /dev/null @@ -1,24 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -void main() -{ - 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 = vec4(red, green, blue, 1.0); -} diff --git a/Data/User/Shaders/darkerbrighter.txt b/Data/User/Shaders/darkerbrighter.txt deleted file mode 100644 index 60acbe0a28..0000000000 --- a/Data/User/Shaders/darkerbrighter.txt +++ /dev/null @@ -1,41 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -uniform vec4 resolution; - -void main() -{ - float4 c0 = texture(samp9, uv0); - float4 c1 = texture(samp9, uv0 - float2(1, 0)*resolution.zw); - float4 c2 = texture(samp9, uv0 - float2(0, 1)*resolution.zw); - float4 c3 = texture(samp9, uv0 + float2(1, 0)*resolution.zw); - float4 c4 = texture(samp9, uv0 + float2(0, 1)*resolution.zw); - - 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/Data/User/Shaders/emboss.txt b/Data/User/Shaders/emboss.txt deleted file mode 100644 index cdf3c3c200..0000000000 --- a/Data/User/Shaders/emboss.txt +++ /dev/null @@ -1,24 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -uniform vec4 resolution; - -void main() -{ - float4 c0 = texture(samp9, uv0).rgba; - float4 c1 = texture(samp9, uv0 + float2(5,5)*resolution.zw).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/Data/User/Shaders/fire.txt b/Data/User/Shaders/fire.txt deleted file mode 100644 index 93bc4ec9db..0000000000 --- a/Data/User/Shaders/fire.txt +++ /dev/null @@ -1,36 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -void main() -{ - vec4 c0 = texture(samp9, uv0); - 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 = vec4(red, green, blue, 1.0); -} diff --git a/Data/User/Shaders/fire2.txt b/Data/User/Shaders/fire2.txt deleted file mode 100644 index a6fe76015c..0000000000 --- a/Data/User/Shaders/fire2.txt +++ /dev/null @@ -1,18 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -void main() -{ - 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 = vec4(red, green, blue, 1.0); -} diff --git a/Data/User/Shaders/firewater.txt b/Data/User/Shaders/firewater.txt deleted file mode 100644 index add2d54e72..0000000000 --- a/Data/User/Shaders/firewater.txt +++ /dev/null @@ -1,22 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -uniform vec4 resolution; - -void main() -{ - float4 c0 = texture(samp9, uv0); - float4 c1 = texture(samp9, uv0 + float2(1,1)*resolution.zw); - float4 c2 = texture(samp9, uv0 + float2(-1,-1)*resolution.zw); - 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/Data/User/Shaders/grayscale.txt b/Data/User/Shaders/grayscale.txt deleted file mode 100644 index 7a828f0a11..0000000000 --- a/Data/User/Shaders/grayscale.txt +++ /dev/null @@ -1,11 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -void main() -{ - 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 deleted file mode 100644 index d9ef25a416..0000000000 --- a/Data/User/Shaders/grayscale2.txt +++ /dev/null @@ -1,12 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -void main() -{ - 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 deleted file mode 100644 index 67c5dee997..0000000000 --- a/Data/User/Shaders/invert.txt +++ /dev/null @@ -1,9 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -void main() -{ - 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 deleted file mode 100644 index aa4eeea43a..0000000000 --- a/Data/User/Shaders/invert_blue.txt +++ /dev/null @@ -1,9 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -void main() -{ - ocol0 = vec4(0.0, 0.0, 0.7, 1.0) - texture(samp9, uv0); -} diff --git a/Data/User/Shaders/invertedoutline.txt b/Data/User/Shaders/invertedoutline.txt deleted file mode 100644 index 66d24fb5ca..0000000000 --- a/Data/User/Shaders/invertedoutline.txt +++ /dev/null @@ -1,14 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -uniform vec4 resolution; - -void main() -{ - float4 c0 = texture(samp9, uv0); - float4 c1 = texture(samp9, uv0 + float2(5,5)*resolution.zw); - - ocol0 = c0 - c1; -}
\ No newline at end of file diff --git a/Data/User/Shaders/mad_world.txt b/Data/User/Shaders/mad_world.txt deleted file mode 100644 index 2e627abb57..0000000000 --- a/Data/User/Shaders/mad_world.txt +++ /dev/null @@ -1,22 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -uniform vec4 resolution; - -void main() -{ - float4 emboss = (texture(samp9, uv0+resolution.zw) - texture(samp9, uv0-resolution.zw))*2.0; - emboss -= (texture(samp9, uv0+float2(1,-1)*resolution.zw).rgba - texture(samp9, uv0+float2(-1,1)*resolution.zw).rgba); - float4 color = texture(samp9, 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/Data/User/Shaders/nightvision.txt b/Data/User/Shaders/nightvision.txt deleted file mode 100644 index ff98cb03b9..0000000000 --- a/Data/User/Shaders/nightvision.txt +++ /dev/null @@ -1,17 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -void main() -{ - float4 c0 = texture(samp9, 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/Data/User/Shaders/nightvision2.txt b/Data/User/Shaders/nightvision2.txt deleted file mode 100644 index 4ed61e16a9..0000000000 --- a/Data/User/Shaders/nightvision2.txt +++ /dev/null @@ -1,56 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -uniform vec4 resolution; - -void main() -{ - //variables - int internalresolution = 1278; - float4 c0 = texture(samp9, uv0).rgba; - //blur - float4 blurtotal = float4(0, 0, 0, 0); - float blursize = 1.5; - blurtotal += texture(samp9, uv0 + float2(-blursize, -blursize)*resolution.zw); - blurtotal += texture(samp9, uv0 + float2(-blursize, blursize)*resolution.zw); - blurtotal += texture(samp9, uv0 + float2( blursize, -blursize)*resolution.zw); - blurtotal += texture(samp9, uv0 + float2( blursize, blursize)*resolution.zw); - blurtotal += texture(samp9, uv0 + float2(-blursize, 0)*resolution.zw); - blurtotal += texture(samp9, uv0 + float2( blursize, 0)*resolution.zw); - blurtotal += texture(samp9, uv0 + float2( 0, -blursize)*resolution.zw); - blurtotal += texture(samp9, uv0 + float2( 0, blursize)*resolution.zw); - 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.x * resolution.x; - float y = uv0.y * resolution.y; - 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/Data/User/Shaders/nightvision2scanlines.txt b/Data/User/Shaders/nightvision2scanlines.txt deleted file mode 100644 index df98629443..0000000000 --- a/Data/User/Shaders/nightvision2scanlines.txt +++ /dev/null @@ -1,61 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -uniform vec4 resolution; - -void main() -{ - //variables - int internalresolution = 1278; - float4 c0 = texture(samp9, uv0).rgba; - //blur - float4 blurtotal = float4(0, 0, 0, 0); - float blursize = 1.5; - blurtotal += texture(samp9, uv0 + float2(-blursize, -blursize)*resolution.zw); - blurtotal += texture(samp9, uv0 + float2(-blursize, blursize)*resolution.zw); - blurtotal += texture(samp9, uv0 + float2( blursize, -blursize)*resolution.zw); - blurtotal += texture(samp9, uv0 + float2( blursize, blursize)*resolution.zw); - blurtotal += texture(samp9, uv0 + float2(-blursize, 0)*resolution.zw); - blurtotal += texture(samp9, uv0 + float2( blursize, 0)*resolution.zw); - blurtotal += texture(samp9, uv0 + float2( 0, -blursize)*resolution.zw); - blurtotal += texture(samp9, uv0 + float2( 0, blursize)*resolution.zw); - 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.y*resolution.y / 9; - float lineIntensity = (((vPos - floor(vPos)) * 9) - 4) / 40; - grey = grey * 0.5 + 0.7 + lineIntensity; - // darken edges - float x = uv0.x * resolution.x; - float y = uv0.y * resolution.y; - 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/Data/User/Shaders/posterize.txt b/Data/User/Shaders/posterize.txt deleted file mode 100644 index 602a412929..0000000000 --- a/Data/User/Shaders/posterize.txt +++ /dev/null @@ -1,29 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -void main() -{ - float4 c0 = texture(samp9, 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/Data/User/Shaders/posterize2.txt b/Data/User/Shaders/posterize2.txt deleted file mode 100644 index fc6c2ef5c9..0000000000 --- a/Data/User/Shaders/posterize2.txt +++ /dev/null @@ -1,24 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -float bound(float color) -{ - if (color < 0.35) - { - if (color < 0.25) - { - return color; - } - return 0.5; - } -return 1.0; -} - -void main() -{ - float4 c0 = texture(samp9, uv0); - ocol0 = float4(bound(c0.r), bound(c0.g), bound(c0.b), c0.a); -} - diff --git a/Data/User/Shaders/primarycolors.txt b/Data/User/Shaders/primarycolors.txt deleted file mode 100644 index c54eda5cd4..0000000000 --- a/Data/User/Shaders/primarycolors.txt +++ /dev/null @@ -1,70 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -void main() -{ - 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.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 = vec4(red, green, blue, c0.a); -} diff --git a/Data/User/Shaders/sepia.txt b/Data/User/Shaders/sepia.txt deleted file mode 100644 index 88f5c15de7..0000000000 --- a/Data/User/Shaders/sepia.txt +++ /dev/null @@ -1,16 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -void main() -{ - 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/sketchy.txt b/Data/User/Shaders/sketchy.txt deleted file mode 100644 index 27cadd3f85..0000000000 --- a/Data/User/Shaders/sketchy.txt +++ /dev/null @@ -1,22 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -uniform vec4 resolution; - -void main() -{ - float4 c0 = texture(samp9, uv0).rgba; - float4 tmp = float4(0, 0, 0, 0); - tmp += c0 - texture(samp9, uv0 + float2(2, 2)*resolution.zw).rgba; - tmp += c0 - texture(samp9, uv0 - float2(2, 2)*resolution.zw).rgba; - tmp += c0 - texture(samp9, uv0 + float2(2, -2)*resolution.zw).rgba; - tmp += c0 - texture(samp9, uv0 - float2(2, -2)*resolution.zw).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.y*resolution.y < 163) - tmp = float4(1.0, 1.0, 1.0, 1.0); - c0 = c0+1-grey*7.0; - ocol0 = float4(c0.r, c0.g, c0.b, 1); -}
\ No newline at end of file diff --git a/Data/User/Shaders/spookey1.txt b/Data/User/Shaders/spookey1.txt deleted file mode 100644 index 6a25d57e5e..0000000000 --- a/Data/User/Shaders/spookey1.txt +++ /dev/null @@ -1,23 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -void main() -{ - 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 = vec4(red, 0.0, blue, 1.0); -} diff --git a/Data/User/Shaders/spookey2.txt b/Data/User/Shaders/spookey2.txt deleted file mode 100644 index 9a56bd21a1..0000000000 --- a/Data/User/Shaders/spookey2.txt +++ /dev/null @@ -1,25 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -void main() -{ - 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 = vec4(red, green, blue, 1.0); -} diff --git a/Data/User/Shaders/stereoscopic.txt b/Data/User/Shaders/stereoscopic.txt deleted file mode 100644 index 3bd6021f39..0000000000 --- a/Data/User/Shaders/stereoscopic.txt +++ /dev/null @@ -1,32 +0,0 @@ -// Omega's 3D Stereoscopic filtering -// TODO: Need depth info! - -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -uniform vec4 resolution; - -void main() -{ - float4 c0 = texture(samp9, uv0).rgba; // Source Color - float sep = 5; - float red = c0.r; - float green = c0.g; - float blue = c0.b; - - - // Left Eye (Red) - float4 c1 = texture(samp9, uv0 + float2(sep,0)*resolution.zw).rgba; - red = max(c0.r, c1.r); - - // Right Eye (Cyan) - float4 c2 = texture(samp9, uv0 + float2(-sep,0)*resolution.zw).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/Data/User/Shaders/stereoscopic2.txt b/Data/User/Shaders/stereoscopic2.txt deleted file mode 100644 index 2407b03832..0000000000 --- a/Data/User/Shaders/stereoscopic2.txt +++ /dev/null @@ -1,32 +0,0 @@ -// Omega's 3D Stereoscopic filtering (Amber/Blue) -// TODO: Need depth info! - -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -uniform vec4 resolution; - -void main() -{ - float4 c0 = texture(samp9, uv0).rgba; // Source Color - float sep = 5; - float red = c0.r; - float green = c0.g; - float blue = c0.b; - - - // Left Eye (Amber) - float4 c2 = texture(samp9, uv0 + float2(sep,0)*resolution.zw).rgba; - float amber = (c2.r + c2.g) / 2; - red = max(c0.r, amber); - green = max(c0.g, amber); - - // Right Eye (Blue) - float4 c1 = texture(samp9, uv0 + float2(-sep,0)*resolution.zw).rgba; - blue = max(c0.b, c1.b); - - - ocol0 = float4(red, green, blue, c0.a); -}
\ No newline at end of file diff --git a/Data/User/Shaders/sunset.txt b/Data/User/Shaders/sunset.txt deleted file mode 100644 index 4a1eae5a4b..0000000000 --- a/Data/User/Shaders/sunset.txt +++ /dev/null @@ -1,10 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -void main() -{ - 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 deleted file mode 100644 index 011411700a..0000000000 --- a/Data/User/Shaders/swap_RGB_BGR.txt +++ /dev/null @@ -1,9 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -void main() -{ - ocol0 = texture(samp9, uv0).bgra; -} diff --git a/Data/User/Shaders/swap_RGB_BRG.txt b/Data/User/Shaders/swap_RGB_BRG.txt deleted file mode 100644 index 82fe665b12..0000000000 --- a/Data/User/Shaders/swap_RGB_BRG.txt +++ /dev/null @@ -1,9 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -void main() -{ - ocol0 = texture(samp9, uv0).brga; -} diff --git a/Data/User/Shaders/swap_RGB_GBR.txt b/Data/User/Shaders/swap_RGB_GBR.txt deleted file mode 100644 index 5884ccd0ab..0000000000 --- a/Data/User/Shaders/swap_RGB_GBR.txt +++ /dev/null @@ -1,9 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -void main() -{ - ocol0 = texture(samp9, uv0).gbra; -} diff --git a/Data/User/Shaders/swap_RGB_GRB.txt b/Data/User/Shaders/swap_RGB_GRB.txt deleted file mode 100644 index 26a4c14f8d..0000000000 --- a/Data/User/Shaders/swap_RGB_GRB.txt +++ /dev/null @@ -1,9 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -void main() -{ - ocol0 = texture(samp9, uv0).grba; -} diff --git a/Data/User/Shaders/swap_RGB_RBG.txt b/Data/User/Shaders/swap_RGB_RBG.txt deleted file mode 100644 index 8e735a7337..0000000000 --- a/Data/User/Shaders/swap_RGB_RBG.txt +++ /dev/null @@ -1,9 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -void main() -{ - ocol0 = texture(samp9, uv0).rbga; -} diff --git a/Data/User/Shaders/toxic.txt b/Data/User/Shaders/toxic.txt deleted file mode 100644 index 38017c400d..0000000000 --- a/Data/User/Shaders/toxic.txt +++ /dev/null @@ -1,25 +0,0 @@ -uniform sampler2D samp9; - -out vec4 ocol0; -in vec2 uv0; - -void main() -{ - 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 = vec4(red, green, blue, 1.0); -} |
