<commit_before>WebGL =

  vertexShader: [
      "attribute vec2 a_position;",
      "attribute vec2 a_textureCoord;",
      
      "uniform vec2 u_offset;",
      "uniform float u_scale;",
      
      "varying vec2 v_textureCoord;",
      
      "void main() {",
          "vec2 position = a_position + u_offset;",
          "position = position * u_scale;",
          "gl_Position = vec4(position, 0.0, 1.0);",
          
          # Pass coordinate to fragment shader
          "v_textureCoord = a_textureCoord;",
      "}"
    ].join("\n")
  
  fragmentShaders:
      linear: [
        "precision mediump float;",
        
        "uniform sampler2D u_tex;",
        "uniform vec2 u_extremes;",
        
        "varying vec2 v_textureCoord;",
        
        "void main() {",
            "vec4 pixel_v = texture2D(u_tex, v_textureCoord);",
            
            "float min = u_extremes[0];",
            "float max = u_extremes[1];",
            "float pixel = (pixel_v[0] - min) / (max - min);",
            
            "gl_FragColor = vec4(pixel, pixel, pixel, 1.0);",
        "}"
      ].join("\n")
      logarithm: [
        "precision mediump float;"
        
        "uniform sampler2D u_tex;",
        "uniform vec2 u_extremes;",
        
        "varying vec2 v_textureCoord;",

        "void main() {",
            "vec4 pixel_v = texture2D(u_tex, v_textureCoord);",
            
            "float min = log(u_extremes[0]);",
            "float max = log(u_extremes[1]);",
            "float pixel = (log(pixel_v[0]) - min) / (max - min);",
            
            "gl_FragColor = vec4(pixel, pixel, pixel, 1.0);",
        "}"
      ].join("\n")
      sqrt: [
        "precision mediump float;"
        
        "uniform sampler2D u_tex;",
        "uniform vec2 u_extremes;",<commit_msg>Fixed log stretch to handle values less than 0<commit_after>WebGL =

  vertexShader: [
      "attribute vec2 a_position;",
      "attribute vec2 a_textureCoord;",
      
      "uniform vec2 u_offset;",
      "uniform float u_scale;",
      
      "varying vec2 v_textureCoord;",
      
      "void main() {",
          "vec2 position = a_position + u_offset;",
          "position = position * u_scale;",
          "gl_Position = vec4(position, 0.0, 1.0);",
          
          # Pass coordinate to fragment shader
          "v_textureCoord = a_textureCoord;",
      "}"
    ].join("\n")
  
  fragmentShaders:
      linear: [
        "precision mediump float;",
        
        "uniform sampler2D u_tex;",
        "uniform vec2 u_extremes;",
        
        "varying vec2 v_textureCoord;",
        
        "void main() {",
            "vec4 pixel_v = texture2D(u_tex, v_textureCoord);",
            
            "float min = u_extremes[0];",
            "float max = u_extremes[1];",
            "float pixel = (pixel_v[0] - min) / (max - min);",
            
            "gl_FragColor = vec4(pixel, pixel, pixel, 1.0);",
        "}"
      ].join("\n")
      logarithm: [
        "precision mediump float;"
        
        "uniform sampler2D u_tex;",
        "uniform vec2 u_extremes;",
        
        "varying vec2 v_textureCoord;",

        "float logarithm(float value) {",
            "return log(value / 0.05 + 1.0) / log(1.0 / 0.05 + 1.0);",
        "}",

        "void main() {",
            "vec4 pixel_v = texture2D(u_tex, v_textureCoord);",
            
            "float min = logarithm(u_extremes[0]);",
            "float max = logarithm(u_extremes[1]);",
            "float pixel = logarithm(pixel_v[0]);",
            
            "pixel = (pixel - min) / (max - min);",
            
            "gl_FragColor = vec4(pixel, pixel, pixel, 1.0);",
        "}"
      ].join("\n")
      sqrt: [
        "precision mediump float;"
        
        "uniform sampler2D u_tex;",
        "uniform vec2 u_extremes;",
{'fraction_non_alphanumeric': 0.13995308835027365, 'fraction_numerical': 0.02111024237685692, 'mean_word_length': 1.626967830253251, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '611792', 'n_tokens_mistral': 1285, 'n_tokens_neox': 1240, 'n_words': 265}