From a26673163f2e08c9876886efdaf82fb501ce4fba Mon Sep 17 00:00:00 2001 From: myownfriend Date: Tue, 20 May 2014 23:39:48 -0400 Subject: [PATCH] Update asciiart.glsl --- Data/Sys/Shaders/asciiart.glsl | 157 +++++++++++++++++---------------- 1 file changed, 81 insertions(+), 76 deletions(-) diff --git a/Data/Sys/Shaders/asciiart.glsl b/Data/Sys/Shaders/asciiart.glsl index d8cfbb4c0d..3a04cf0e1d 100644 --- a/Data/Sys/Shaders/asciiart.glsl +++ b/Data/Sys/Shaders/asciiart.glsl @@ -1,4 +1,5 @@ -uniform sampler2D samp8; // textures +// textures +uniform sampler2D samp8; uniform sampler2D samp9; const int char_width = 8; @@ -15,81 +16,85 @@ 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; + vec2 char_pos = floor(uv0*resolution.xy/char_dim); + vec2 pixel_offset = floor(uv0*resolution.xy) - char_pos*char_dim; - float mindiff = float(char_width*char_height) * 100.0; // 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