| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,157 +1,86 @@ | ||
| 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); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,21 @@ | ||
| 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); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,11 @@ | ||
| 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; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,13 @@ | ||
| 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; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| 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); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,22 @@ | ||
| 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; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,9 @@ | ||
| uniform sampler2D samp9; | ||
|
|
||
| out vec4 ocol0; | ||
| in vec2 uv0; | ||
|
|
||
| void main() | ||
| { | ||
| ocol0 = texture(samp9, uv0) * 3; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,17 @@ | ||
| 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); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,24 @@ | ||
| 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); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,39 +1,36 @@ | ||
| 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); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,18 @@ | ||
| 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); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,11 @@ | ||
| 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); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,12 @@ | ||
| 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); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,9 @@ | ||
| uniform sampler2D samp9; | ||
|
|
||
| out vec4 ocol0; | ||
| in vec2 uv0; | ||
|
|
||
| void main() | ||
| { | ||
| ocol0 = vec4(1.0, 1.0, 1.0, 1.0) - texture(samp9, uv0); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,9 @@ | ||
| uniform sampler2D samp9; | ||
|
|
||
| out vec4 ocol0; | ||
| in vec2 uv0; | ||
|
|
||
| void main() | ||
| { | ||
| ocol0 = vec4(0.0, 0.0, 0.7, 1.0) - texture(samp9, uv0); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,14 @@ | ||
| 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; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,69 +1,70 @@ | ||
| 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); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,16 @@ | ||
| 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); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,22 @@ | ||
| 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); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,23 @@ | ||
| 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); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,25 @@ | ||
| 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); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,10 @@ | ||
| 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); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,9 @@ | ||
| uniform sampler2D samp9; | ||
|
|
||
| out vec4 ocol0; | ||
| in vec2 uv0; | ||
|
|
||
| void main() | ||
| { | ||
| ocol0 = texture(samp9, uv0).bgra; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,9 @@ | ||
| uniform sampler2D samp9; | ||
|
|
||
| out vec4 ocol0; | ||
| in vec2 uv0; | ||
|
|
||
| void main() | ||
| { | ||
| ocol0 = texture(samp9, uv0).brga; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,9 @@ | ||
| uniform sampler2D samp9; | ||
|
|
||
| out vec4 ocol0; | ||
| in vec2 uv0; | ||
|
|
||
| void main() | ||
| { | ||
| ocol0 = texture(samp9, uv0).gbra; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,9 @@ | ||
| uniform sampler2D samp9; | ||
|
|
||
| out vec4 ocol0; | ||
| in vec2 uv0; | ||
|
|
||
| void main() | ||
| { | ||
| ocol0 = texture(samp9, uv0).grba; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,9 @@ | ||
| uniform sampler2D samp9; | ||
|
|
||
| out vec4 ocol0; | ||
| in vec2 uv0; | ||
|
|
||
| void main() | ||
| { | ||
| ocol0 = texture(samp9, uv0).rbga; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,25 @@ | ||
| 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); | ||
| } |