• 0

    posted a message on MAtmos - Environmental sound atmosphere simulator
    Does this work with 1.2.3?
    Posted in: Minecraft Mods
  • 0

    posted a message on Sonic Ether's Unbelievable Shaders [compatible with Minecraft 1.12.2 via OptiFine]
    Even with a graphics card you will lag.
    I have a Hex-Core processor, 16GB ram all DDR3, a solid state HD, and two crossfired AMD HD 6870s. And I only get 30 fps. **** is this ****, man?
    Still, nice shaders. I tweaked the HDR shader and perfected it ;3
    Going in the dark areas like a house or cave will brighten the screen and make outside real bright and going outside will normalize the screen and bring it back to normal. Just try it out:
    #version 120
    /*
    Settings by Sonic Ether
    Bokeh Depth-of-Field by Sonic Ether
    God Rays by Blizzard
    Bloom shader by CosmicSpore (Modified from original source: http://myheroics.wordpress.com/2008/09/04/glsl-bloom-shader/)
    Cross-Processing by Sonic Ether.
    High Desaturation effect by Sonic Ether
    HDR by Sonic Ether
    Glare by Sonic Ether
    Shaders 2.0 port of Yourself's Cell Shader, port by an anonymous user.
    Bug Fixes by Kool_Kat.
    */
    // Place two leading Slashes in front of the following '#define' lines in order to disable an option.
    // MOTIONBLUR, HDR, and BOKEH_DOF are very beta shaders. Use at risk of weird results.
    // MOTIONBLUR and BOKEH_DOF are not compatable with eachother. Shaders break when you enable both.
    // GLARE is still a work in progress.
    // BLOOM is currently broken.
    #define HDR
    #define HDR_RANGE 2.1	 // Higher value means that HDR will modulate screen brightness more. Default = 1.0
    //#define BOKEH_DOF
    //#define GODRAYS
    //#define GODRAYS_EXPOSURE 0.8
    //#define GODRAYS_SAMPLES 16
    //#define GODRAYS_DECAY 0.9
    //#define GODRAYS_DENSITY 0.5
    //#define GLARE
    //#define GLARE_AMOUNT 0.25
    //#define GLARE_RANGE 3.0
    //#define BLOOM
    //#define BLOOM_AMOUNT 1.0
    //#define BLOOM_RANGE 3
    //#define CEL_SHADING
    //#define CEL_SHADING_THRESHOLD 0.4
    //#define CEL_SHADING_THICKNESS 0.004
    //#define USE_HIGH_QUALITY_BLUR
    #define CROSSPROCESS
    #define BRIGHTMULT 1.1				  // 1.0 = default brightness. Higher values mean brighter. 0 would be black.
    #define DARKMULT 0.02	  // 0.0 = normal image. Higher values will darken dark colors.
    #define COLOR_BOOST 0.2	 // 0.0 = normal saturation. Higher values mean more saturated image.
    //#define MOTIONBLUR
    //#define MOTIONBLUR_AMOUNT 2.5
    #define HIGHDESATURATE
    #define GAMMA 0.95	   //1.0 is default brightness. lower values will brighten image, higher values will darken image
    // DOF Constants - DO NOT CHANGE
    // HYPERFOCAL = (Focal Distance ^ 2)/(Circle of Confusion * F Stop) + Focal Distance
    #ifdef USE_DOF
    const float HYPERFOCAL = 3.132;
    const float PICONSTANT = 3.14159;
    #endif
    //uniform sampler2D texture;
    uniform sampler2D gcolor;
    uniform sampler2D gdepth;
    uniform sampler2D composite;
    uniform sampler2D gnormal;
    uniform sampler2D gaux1; // red is our motion blur mask. If red == 1, don't blur
    uniform mat4 gbufferProjectionInverse;
    uniform mat4 gbufferPreviousProjection;
    uniform mat4 gbufferModelViewInverse;
    uniform mat4 gbufferPreviousModelView;
    uniform vec3 cameraPosition;
    uniform vec3 previousCameraPosition;
    uniform vec3 sunPosition;
    uniform float worldTime;
    uniform float aspectRatio;
    uniform float near;
    uniform float far;
    varying vec4 texcoord;
    
    // Standard depth function.
    float getDepth(vec2 coord) {
        return 2.0 * near * far / (far + near - (2.0 * texture2D(gdepth, coord).x - 1.0) * (far - near));
    }
    float eDepth(vec2 coord) {
    return texture2D(gdepth, coord).x;
    }
    float realcolor(vec2 coord) {
    return ((texture2D(gcolor, coord).r + texture2D(gcolor, coord).g + texture2D(gcolor, coord).B)/3.0);
    }
    float prevavgclr;
    float prevavgclrb;
    #ifdef BOKEH_DOF
    const float blurclamp = 10.0;  // max blur amount
    const float bias = 0.3; //aperture - bigger values for shallower depth of field
    #endif
    #ifdef GODRAYS
    vec4 addGodRays(vec4 nc, vec2 tx) {
      float threshold = 0.99 * far;
    //  bool foreground = false;
      float depthGD = getDepth(tx);
      if ( (worldTime < 14000 || worldTime > 22000) && (sunPosition.z < 0) && (depthGD < threshold) ) {
       vec2 lightPos = sunPosition.xy / -sunPosition.z;
       lightPos.y *= aspectRatio;
       lightPos = (lightPos + 1.0)/2.0;
       //vec2 coord = tx;
       vec2 delta = (tx - lightPos) * GODRAYS_DENSITY / float(GODRAYS_SAMPLES);
       float decay = -sunPosition.z / 100.0;
       vec3 colorGD = vec3(0.0);
     
       for (int i = 0; i < GODRAYS_SAMPLES; i++) {
        tx -= delta;
        if (tx.x < 0.0 || tx.x > 1.0) {
    	 if (tx.y < 0.0 || tx.y > 1.0) {
    	  break;
    	 }
        }
        vec3 sample = vec3(0.0);
        if (getDepth(tx) > threshold) {
    	 sample = texture2D(composite, tx).rgb;
        }
        sample *= vec3(decay);
        if (distance(tx, lightPos) > 0.05) {
    	 sample *= 0.2;
        }
    	 colorGD += sample;
    	 decay *= GODRAYS_DECAY;
       }
       return (nc + GODRAYS_EXPOSURE * vec4(colorGD, 0.0));
    	    } else {
       return nc;
      }
    }
    #endif
    /*
    #ifdef BLOOM
    vec4 addBloom(vec4 c, vec2 t) {
      int j;
      int i;
      vec4 bloom = vec4(0.0);
      vec2 loc = vec2(0.0);
      float count = 0.0;
      for( i= -BLOOM_RANGE ; i < BLOOM_RANGE; i++ ) {
       for ( j = -BLOOM_RANGE; j < BLOOM_RANGE; j++ ) {
        loc = t + vec2(j, i)*0.004;
     
        // Only add to bloom texture if loc is on-screen.
        if(loc.x > 0 && loc.x < 1 && loc.y > 0 && loc.y < 1) {
    	 bloom += texture2D(composite, loc) * BLOOM_AMOUNT;
    	 count += 1;
        }
       }
      }
      bloom /= vec4(count);
      if (c.r < 0.3)
      {
       return bloom*bloom*0.012;
      }
      else
      {
       if (c.r < 0.5)
       {
        return bloom*bloom*0.009;
       }
       else
       {
        return bloom*bloom*0.0075;
       }
      }
    }
    #endif
    */
    #ifdef CEL_SHADING
    float getCellShaderFactor(vec2 coord) {
        float d = getDepth(coord);
        vec3 n = normalize(vec3(getDepth(coord+vec2(CEL_SHADING_THICKNESS,0.0))-d,getDepth(coord+vec2(0.0,CEL_SHADING_THICKNESS))-d , CEL_SHADING_THRESHOLD));
        //clamp(n.z*3.0,0.0,1.0);
        return n.z;
    }
    #endif
    // Main ---------------------------------------------------------------------------------------------------
    void main() {
    vec4 color = texture2D(composite, texcoord.st);
    #ifdef BOKEH_DOF
    float depth = eDepth(texcoord.xy);
    if (depth > 0.9999) {
      depth = 1.0;
    }
    float cursorDepth = eDepth(vec2(0.5, 0.5));
    if (cursorDepth > 0.9999) {
      cursorDepth = 1.0;
    }
    
    vec2 aspectcorrect = vec2(1.0, aspectRatio) * 1.5;
    float factor = (depth - cursorDepth);
    vec2 dofblur = (vec2 (clamp( factor * bias, -blurclamp, blurclamp )))*0.4;
    vec4 col = vec4(0.0);
    col += texture2D(composite, texcoord.st);
    col += texture2D(composite, texcoord.st + (vec2( 0.0,0.4 )*aspectcorrect) * dofblur);
    col += texture2D(composite, texcoord.st + (vec2( 0.15,0.37 )*aspectcorrect) * dofblur);
    col += texture2D(composite, texcoord.st + (vec2( 0.29,0.29 )*aspectcorrect) * dofblur);
    col += texture2D(composite, texcoord.st + (vec2( -0.37,0.15 )*aspectcorrect) * dofblur);
    col += texture2D(composite, texcoord.st + (vec2( 0.4,0.0 )*aspectcorrect) * dofblur);
    col += texture2D(composite, texcoord.st + (vec2( 0.37,-0.15 )*aspectcorrect) * dofblur);
    col += texture2D(composite, texcoord.st + (vec2( 0.29,-0.29 )*aspectcorrect) * dofblur);
    col += texture2D(composite, texcoord.st + (vec2( -0.15,-0.37 )*aspectcorrect) * dofblur);
    col += texture2D(composite, texcoord.st + (vec2( 0.0,-0.4 )*aspectcorrect) * dofblur);
    col += texture2D(composite, texcoord.st + (vec2( -0.15,0.37 )*aspectcorrect) * dofblur);
    col += texture2D(composite, texcoord.st + (vec2( -0.29,0.29 )*aspectcorrect) * dofblur);
    col += texture2D(composite, texcoord.st + (vec2( 0.37,0.15 )*aspectcorrect) * dofblur);
    col += texture2D(composite, texcoord.st + (vec2( -0.4,0.0 )*aspectcorrect) * dofblur);
    col += texture2D(composite, texcoord.st + (vec2( -0.37,-0.15 )*aspectcorrect) * dofblur);
    col += texture2D(composite, texcoord.st + (vec2( -0.29,-0.29 )*aspectcorrect) * dofblur);
    col += texture2D(composite, texcoord.st + (vec2( 0.15,-0.37 )*aspectcorrect) * dofblur);
    col += texture2D(composite, texcoord.st + (vec2( 0.15,0.37 )*aspectcorrect) * dofblur*0.9);
    col += texture2D(composite, texcoord.st + (vec2( -0.37,0.15 )*aspectcorrect) * dofblur*0.9);
    col += texture2D(composite, texcoord.st + (vec2( 0.37,-0.15 )*aspectcorrect) * dofblur*0.9);
    col += texture2D(composite, texcoord.st + (vec2( -0.15,-0.37 )*aspectcorrect) * dofblur*0.9);
    col += texture2D(composite, texcoord.st + (vec2( -0.15,0.37 )*aspectcorrect) * dofblur*0.9);
    col += texture2D(composite, texcoord.st + (vec2( 0.37,0.15 )*aspectcorrect) * dofblur*0.9);
    col += texture2D(composite, texcoord.st + (vec2( -0.37,-0.15 )*aspectcorrect) * dofblur*0.9);
    col += texture2D(composite, texcoord.st + (vec2( 0.15,-0.37 )*aspectcorrect) * dofblur*0.9);
    col += texture2D(composite, texcoord.st + (vec2( 0.29,0.29 )*aspectcorrect) * dofblur*0.7);
    col += texture2D(composite, texcoord.st + (vec2( 0.4,0.0 )*aspectcorrect) * dofblur*0.7);
    col += texture2D(composite, texcoord.st + (vec2( 0.29,-0.29 )*aspectcorrect) * dofblur*0.7);
    col += texture2D(composite, texcoord.st + (vec2( 0.0,-0.4 )*aspectcorrect) * dofblur*0.7);
    col += texture2D(composite, texcoord.st + (vec2( -0.29,0.29 )*aspectcorrect) * dofblur*0.7);
    col += texture2D(composite, texcoord.st + (vec2( -0.4,0.0 )*aspectcorrect) * dofblur*0.7);
    col += texture2D(composite, texcoord.st + (vec2( -0.29,-0.29 )*aspectcorrect) * dofblur*0.7);
    col += texture2D(composite, texcoord.st + (vec2( 0.0,0.4 )*aspectcorrect) * dofblur*0.7);
     
    col += texture2D(composite, texcoord.st + (vec2( 0.29,0.29 )*aspectcorrect) * dofblur*0.4);
    col += texture2D(composite, texcoord.st + (vec2( 0.4,0.0 )*aspectcorrect) * dofblur*0.4);
    col += texture2D(composite, texcoord.st + (vec2( 0.29,-0.29 )*aspectcorrect) * dofblur*0.4);
    col += texture2D(composite, texcoord.st + (vec2( 0.0,-0.4 )*aspectcorrect) * dofblur*0.4);
    col += texture2D(composite, texcoord.st + (vec2( -0.29,0.29 )*aspectcorrect) * dofblur*0.4);
    col += texture2D(composite, texcoord.st + (vec2( -0.4,0.0 )*aspectcorrect) * dofblur*0.4);
    col += texture2D(composite, texcoord.st + (vec2( -0.29,-0.29 )*aspectcorrect) * dofblur*0.4);
    col += texture2D(composite, texcoord.st + (vec2( 0.0,0.4 )*aspectcorrect) * dofblur*0.4);
    color = col/41;
    #endif
    /*
    #ifdef USE_DOF
    float depth = getDepth(texcoord.st);
       
    float cursorDepth = getDepth(vec2(0.5, 0.5));
     
        // foreground blur = 1/2 background blur. Blur should follow exponential pattern until cursor = hyperfocal -- Cursor before hyperfocal
        // Blur should go from 0 to 1/2 hyperfocal then clear to infinity -- Cursor @ hyperfocal.
        // hyperfocal to inifity is clear though dof extends from 1/2 hyper to hyper -- Cursor beyond hyperfocal
     
        float mixAmount = 0.0;
     
        if (depth < cursorDepth) {
    	 mixAmount = clamp(2.0 * ((clamp(cursorDepth, 0.0, HYPERFOCAL) - depth) / (clamp(cursorDepth, 0.0, HYPERFOCAL))), 0.0, 1.0);
    } else if (cursorDepth == HYPERFOCAL) {
      mixAmount = 0.0;
    } else {
      mixAmount =  1.0 - clamp((((cursorDepth * HYPERFOCAL) / (HYPERFOCAL - cursorDepth)) - (depth - cursorDepth)) / ((cursorDepth * HYPERFOCAL) / (HYPERFOCAL - cursorDepth)), 0.0, 1.0);
    }
     
        if (mixAmount != 0.0) {
      color = mix(color, getBlurredColor(), mixAmount);
        }
    #endif
    */
    
    #ifdef MOTIONBLUR
    vec4 depth = texture2D(gdepth, texcoord.st);
    float blurmask = texture2D(gaux1, texcoord.st).r;
      if (depth.x > 0.9999999) {
      depth.x = 1;
      }
    
    
      if (depth.x < 1.9999999) {
      vec4 currentPosition = vec4(texcoord.x * 2.0 - 1.0, texcoord.y * 2.0 - 1.0, 2.0 * depth.x - 1.0, 1.0);
      vec4 fragposition = gbufferProjectionInverse * currentPosition;
      fragposition = gbufferModelViewInverse * fragposition;
      fragposition /= fragposition.w;
      fragposition.xyz += cameraPosition;
      vec4 previousPosition = fragposition;
      previousPosition.xyz -= previousCameraPosition;
      previousPosition = gbufferPreviousModelView * previousPosition;
      previousPosition = gbufferPreviousProjection * previousPosition;
      previousPosition /= previousPosition.w;
      vec2 velocity = (currentPosition - previousPosition).st * 0.009 * MOTIONBLUR_AMOUNT;
      velocity = velocity;
      int samples = 1;
      if (blurmask > 0.999999) {
       velocity = vec2(0,0);
      }
    
      vec2 coord = texcoord.st + velocity;
      for (int i = 0; i < 16; ++i, coord += velocity) {
       if (coord.s > 1.0 || coord.t > 1.0 || coord.s < 0.0 || coord.t < 0.0) {
        break;
       }
       color += texture2D(composite, coord);
       ++samples;
      }
       color = color/samples;
      }
    
    #endif
    #ifdef GODRAYS
    color.r = addGodRays(color, texcoord.st).r;
    color.g = addGodRays(color, texcoord.st).g;
    color.b = addGodRays(color, texcoord.st).b;
    #endif
    /*
    #ifdef BLOOM
    color = color * 0.8;
    color += addBloom(color, texcoord.st);
    #endif
    */
    #ifdef BLOOM
    color = color * 0.8;
    float radius = 0.002;
    float blm_amount = 0.02*BLOOM_AMOUNT;
    float sc = 20.0;
    int i = 0;
    int samples = 1;
    vec4 clr = vec4(0.0);
    for (i = -10; i < 10; i++) {
    clr += texture2D(composite, texcoord.st + (vec2(i,i))*radius)*sc;
    clr += texture2D(composite, texcoord.st + (vec2(i,-i))*radius)*sc;
    clr += texture2D(composite, texcoord.st + (vec2(-i,i))*radius)*sc;
    clr += texture2D(composite, texcoord.st + (vec2(-i,-i))*radius)*sc;
    clr += texture2D(composite, texcoord.st + (vec2(0.0,i))*radius)*sc;
    clr += texture2D(composite, texcoord.st + (vec2(0.0,-i))*radius)*sc;
    clr += texture2D(composite, texcoord.st + (vec2(-i,0.0))*radius)*sc;
    clr += texture2D(composite, texcoord.st + (vec2(i,0.0))*radius)*sc;
    ++samples;
    sc = sc - 1.0;
    }
    clr = (clr/8.0)/samples;
    color += clr*blm_amount;
    #endif
    #ifdef GLARE
    color = color * 0.8;
    float radius = 0.002*GLARE_RANGE;
    float radiusv = 0.002;
    float bloomintensity = 0.1*GLARE_AMOUNT;
    vec4 clr = vec4(0.0);
    clr += texture2D(composite, texcoord.st);
    //horizontal (70 taps)
    
    clr += texture2D(composite, texcoord.st + (vec2(10.0,0.0))*radius)*10.0;
    clr += texture2D(composite, texcoord.st + (vec2(9.0,0.0))*radius)*11.0;
    clr += texture2D(composite, texcoord.st + (vec2(8.0,0.0))*radius)*12.0;
    clr += texture2D(composite, texcoord.st + (vec2(7.0,0.0))*radius)*13.0;
    clr += texture2D(composite, texcoord.st + (vec2(6.0,0.0))*radius)*14.0;
    clr += texture2D(composite, texcoord.st + (vec2(5.0,0.0))*radius)*15.0;
    clr += texture2D(composite, texcoord.st + (vec2(4.0,0.0))*radius)*16.0;
    clr += texture2D(composite, texcoord.st + (vec2(3.0,0.0))*radius)*17.0;
    clr += texture2D(composite, texcoord.st + (vec2(2.0,0.0))*radius)*18.0;
    clr += texture2D(composite, texcoord.st + (vec2(1.0,0.0))*radius)*19.0;
      clr += texture2D(composite, texcoord.st + (vec2(0.0,0.0))*radius)*20.0;
    clr += texture2D(composite, texcoord.st + (vec2(-1.0,0.0))*radius)*19.0;
    clr += texture2D(composite, texcoord.st + (vec2(-2.0,0.0))*radius)*18.0;
    clr += texture2D(composite, texcoord.st + (vec2(-3.0,0.0))*radius)*17.0;
    clr += texture2D(composite, texcoord.st + (vec2(-4.0,0.0))*radius)*16.0;
    clr += texture2D(composite, texcoord.st + (vec2(-5.0,0.0))*radius)*15.0;
    clr += texture2D(composite, texcoord.st + (vec2(-6.0,0.0))*radius)*14.0;
    clr += texture2D(composite, texcoord.st + (vec2(-7.0,0.0))*radius)*13.0;
    clr += texture2D(composite, texcoord.st + (vec2(-8.0,0.0))*radius)*12.0;
    clr += texture2D(composite, texcoord.st + (vec2(-9.0,0.0))*radius)*11.0;
    clr += texture2D(composite, texcoord.st + (vec2(-10.0,0.0))*radius)*10.0;
    //vertical
    clr += texture2D(composite, texcoord.st + (vec2(0.0,10.0))*radius)*10.0;
    clr += texture2D(composite, texcoord.st + (vec2(0.0,9.0))*radius)*11.0;
    clr += texture2D(composite, texcoord.st + (vec2(0.0,8.0))*radius)*12.0;
    clr += texture2D(composite, texcoord.st + (vec2(0.0,7.0))*radius)*13.0;
    clr += texture2D(composite, texcoord.st + (vec2(0.0,6.0))*radius)*14.0;
    clr += texture2D(composite, texcoord.st + (vec2(0.0,5.0))*radius)*15.0;
    clr += texture2D(composite, texcoord.st + (vec2(0.0,4.0))*radius)*16.0;
    clr += texture2D(composite, texcoord.st + (vec2(0.0,3.0))*radius)*17.0;
    clr += texture2D(composite, texcoord.st + (vec2(0.0,2.0))*radius)*18.0;
    clr += texture2D(composite, texcoord.st + (vec2(0.0,1.0))*radius)*19.0;
    
    clr += texture2D(composite, texcoord.st + (vec2(0.0,-10.0))*radius)*10.0;
    clr += texture2D(composite, texcoord.st + (vec2(0.0,-9.0))*radius)*11.0;
    clr += texture2D(composite, texcoord.st + (vec2(0.0,-8.0))*radius)*12.0;
    clr += texture2D(composite, texcoord.st + (vec2(0.0,-7.0))*radius)*13.0;
    clr += texture2D(composite, texcoord.st + (vec2(0.0,-6.0))*radius)*14.0;
    clr += texture2D(composite, texcoord.st + (vec2(0.0,-5.0))*radius)*15.0;
    clr += texture2D(composite, texcoord.st + (vec2(0.0,-4.0))*radius)*16.0;
    clr += texture2D(composite, texcoord.st + (vec2(0.0,-3.0))*radius)*17.0;
    clr += texture2D(composite, texcoord.st + (vec2(0.0,-2.0))*radius)*18.0;
    clr += texture2D(composite, texcoord.st + (vec2(0.0,-1.0))*radius)*19.0;
    clr = (clr/20.0)/5.0;
    clr.r = pow(clr.r, 1.2)*1.6 - (clr.g + clr.B)*0.6;
    clr.g = pow(clr.g, 1.2)*1.6 - (clr.r + clr.B)*0.6;
    clr.b = pow(clr.b, 1.2)*1.9 - (clr.r + clr.g)*0.9;
    clr = clamp((clr), 0.0, 1.0);
    color.r = color.r + (clr.r*1.5)*bloomintensity;
    color.g = color.g + (clr.g*1.5)*bloomintensity;
    color.b = color.b + (clr.b*4.0)*bloomintensity;
    color = max(color, 0.0);
    //color = color*1.05 - 0.05;
    #endif
    #ifdef CEL_SHADING
    color.rgb *= (getCellShaderFactor(texcoord.st));
    float cr = color.r;
    float cg = color.g;
    float cb = color.b;
    #endif
    #ifdef HDR
    //determine screen brightness
    float avgclr = realcolor(vec2(0.5, 0.5));
        avgclr += realcolor(vec2(0.01, 0.01));
    avgclr += realcolor(vec2(0.01, -0.01));
    avgclr += realcolor(vec2(-0.01, 0.01));
    avgclr += realcolor(vec2(-0.01, -0.01));
     
    avgclr += realcolor(vec2(0.02, 0.02));
    avgclr += realcolor(vec2(0.02, -0.02));
    avgclr += realcolor(vec2(-0.02, 0.02));
    avgclr += realcolor(vec2(-0.02, -0.02));
    avgclr += realcolor(vec2(0.03, 0.03));
    avgclr += realcolor(vec2(0.03, -0.03));
    avgclr += realcolor(vec2(-0.03, 0.03));
    avgclr += realcolor(vec2(-0.03, -0.03));
    avgclr += realcolor(vec2(0.04, 0.04));
    avgclr += realcolor(vec2(0.04, -0.04));
    avgclr += realcolor(vec2(-0.04, 0.04));
    avgclr += realcolor(vec2(-0.04, -0.04));
    avgclr += realcolor(vec2(0.05, 0.05));
    avgclr += realcolor(vec2(0.05, -0.05));
    avgclr += realcolor(vec2(-0.05, 0.05));
    avgclr += realcolor(vec2(-0.05, -0.05));
    avgclr += realcolor(vec2(0.06, 0.06));
    avgclr += realcolor(vec2(0.06, -0.06));
    avgclr += realcolor(vec2(-0.06, 0.06));
    avgclr += realcolor(vec2(-0.06, -0.06));
    avgclr += realcolor(vec2(0.07, 0.07));
    avgclr += realcolor(vec2(0.07, -0.07));
    avgclr += realcolor(vec2(-0.07, 0.07));
    avgclr += realcolor(vec2(-0.07, -0.07));
    avgclr += realcolor(vec2(0.08, 0.08));
    avgclr += realcolor(vec2(0.08, -0.08));
    avgclr += realcolor(vec2(-0.08, 0.08));
    avgclr += realcolor(vec2(-0.08, -0.08));
    avgclr += realcolor(vec2(0.09, 0.09));
    avgclr += realcolor(vec2(0.09, -0.09));
    avgclr += realcolor(vec2(-0.09, 0.09));
    avgclr += realcolor(vec2(-0.09, -0.09));
    avgclr += realcolor(vec2(0.10, 0.10));
    avgclr += realcolor(vec2(0.10, -0.10));
    avgclr += realcolor(vec2(-0.10, 0.10));
    avgclr += realcolor(vec2(-0.10, -0.10));
    
    avgclr += realcolor(vec2(0.11, 0.11));
    avgclr += realcolor(vec2(0.11, -0.11));
    avgclr += realcolor(vec2(-0.11, 0.11));
    avgclr += realcolor(vec2(-0.11, -0.11));
     
    avgclr += realcolor(vec2(0.12, 0.12));
    avgclr += realcolor(vec2(0.12, -0.12));
    avgclr += realcolor(vec2(-0.12, 0.12));
    avgclr += realcolor(vec2(-0.12, -0.12));
    avgclr += realcolor(vec2(0.13, 0.13));
    avgclr += realcolor(vec2(0.13, -0.13));
    avgclr += realcolor(vec2(-0.13, 0.13));
    avgclr += realcolor(vec2(-0.13, -0.13));
    avgclr += realcolor(vec2(0.14, 0.14));
    avgclr += realcolor(vec2(0.14, -0.14));
    avgclr += realcolor(vec2(-0.14, 0.14));
    avgclr += realcolor(vec2(-0.14, -0.14));
    avgclr += realcolor(vec2(0.15, 0.15));
    avgclr += realcolor(vec2(0.15, -0.15));
    avgclr += realcolor(vec2(-0.15, 0.15));
    avgclr += realcolor(vec2(-0.15, -0.15));
    avgclr += realcolor(vec2(0.16, 0.16));
    avgclr += realcolor(vec2(0.16, -0.16));
    avgclr += realcolor(vec2(-0.16, 0.16));
    avgclr += realcolor(vec2(-0.16, -0.16));
    avgclr += realcolor(vec2(0.17, 0.17));
    avgclr += realcolor(vec2(0.17, -0.17));
    avgclr += realcolor(vec2(-0.17, 0.17));
    avgclr += realcolor(vec2(-0.17, -0.17));
    avgclr += realcolor(vec2(0.18, 0.18));
    avgclr += realcolor(vec2(0.18, -0.18));
    avgclr += realcolor(vec2(-0.18, 0.18));
    avgclr += realcolor(vec2(-0.18, -0.18));
    avgclr += realcolor(vec2(0.19, 0.19));
    avgclr += realcolor(vec2(0.19, -0.19));
    avgclr += realcolor(vec2(-0.19, 0.19));
    avgclr += realcolor(vec2(-0.19, -0.19));
    avgclr += realcolor(vec2(0.20, 0.20));
    avgclr += realcolor(vec2(0.20, -0.20));
    avgclr += realcolor(vec2(-0.20, 0.20));
    avgclr += realcolor(vec2(-0.20, -0.20));
    avgclr += realcolor(vec2(0.21, 0.21));
    avgclr += realcolor(vec2(0.21, -0.21));
    avgclr += realcolor(vec2(-0.21, 0.21));
    avgclr += realcolor(vec2(-0.21, -0.21));
     
    avgclr += realcolor(vec2(0.22, 0.22));
    avgclr += realcolor(vec2(0.22, -0.22));
    avgclr += realcolor(vec2(-0.22, 0.22));
    avgclr += realcolor(vec2(-0.22, -0.22));
    avgclr += realcolor(vec2(0.23, 0.23));
    avgclr += realcolor(vec2(0.23, -0.23));
    avgclr += realcolor(vec2(-0.23, 0.23));
    avgclr += realcolor(vec2(-0.23, -0.23));
    avgclr += realcolor(vec2(0.24, 0.24));
    avgclr += realcolor(vec2(0.24, -0.24));
    avgclr += realcolor(vec2(-0.24, 0.24));
    avgclr += realcolor(vec2(-0.24, -0.24));
    avgclr += realcolor(vec2(0.25, 0.25));
    avgclr += realcolor(vec2(0.25, -0.25));
    avgclr += realcolor(vec2(-0.25, 0.25));
    avgclr += realcolor(vec2(-0.25, -0.25));
    avgclr += realcolor(vec2(0.26, 0.26));
    avgclr += realcolor(vec2(0.26, -0.26));
    avgclr += realcolor(vec2(-0.26, 0.26));
    avgclr += realcolor(vec2(-0.26, -0.26));
    avgclr += realcolor(vec2(0.27, 0.27));
    avgclr += realcolor(vec2(0.27, -0.27));
    avgclr += realcolor(vec2(-0.27, 0.27));
    avgclr += realcolor(vec2(-0.27, -0.27));
    avgclr += realcolor(vec2(0.28, 0.28));
    avgclr += realcolor(vec2(0.28, -0.28));
    avgclr += realcolor(vec2(-0.28, 0.28));
    avgclr += realcolor(vec2(-0.28, -0.28));
    avgclr += realcolor(vec2(0.29, 0.29));
    avgclr += realcolor(vec2(0.29, -0.29));
    avgclr += realcolor(vec2(-0.29, 0.29));
    avgclr += realcolor(vec2(-0.29, -0.29));
    avgclr += realcolor(vec2(0.40, 0.40));
    avgclr += realcolor(vec2(0.40, -0.40));
    avgclr += realcolor(vec2(-0.40, 0.40));
    avgclr += realcolor(vec2(-0.40, -0.40));
    
    avgclr += realcolor(vec2(0.31, 0.31));
    avgclr += realcolor(vec2(0.31, -0.31));
    avgclr += realcolor(vec2(-0.31, 0.31));
    avgclr += realcolor(vec2(-0.31, -0.31));
     
    avgclr += realcolor(vec2(0.32, 0.32));
    avgclr += realcolor(vec2(0.32, -0.32));
    avgclr += realcolor(vec2(-0.32, 0.32));
    avgclr += realcolor(vec2(-0.32, -0.32));
    avgclr += realcolor(vec2(0.33, 0.33));
    avgclr += realcolor(vec2(0.33, -0.33));
    avgclr += realcolor(vec2(-0.33, 0.33));
    avgclr += realcolor(vec2(-0.33, -0.33));
    avgclr += realcolor(vec2(0.34, 0.34));
    avgclr += realcolor(vec2(0.34, -0.34));
    avgclr += realcolor(vec2(-0.34, 0.34));
    avgclr += realcolor(vec2(-0.34, -0.34));
    avgclr += realcolor(vec2(0.35, 0.35));
    avgclr += realcolor(vec2(0.35, -0.35));
    avgclr += realcolor(vec2(-0.35, 0.35));
    avgclr += realcolor(vec2(-0.35, -0.35));
    avgclr += realcolor(vec2(0.36, 0.36));
    avgclr += realcolor(vec2(0.36, -0.36));
    avgclr += realcolor(vec2(-0.36, 0.36));
    avgclr += realcolor(vec2(-0.36, -0.36));
    avgclr += realcolor(vec2(0.37, 0.37));
    avgclr += realcolor(vec2(0.37, -0.37));
    avgclr += realcolor(vec2(-0.37, 0.37));
    avgclr += realcolor(vec2(-0.37, -0.37));
    avgclr += realcolor(vec2(0.38, 0.38));
    avgclr += realcolor(vec2(0.38, -0.38));
    avgclr += realcolor(vec2(-0.38, 0.38));
    avgclr += realcolor(vec2(-0.38, -0.38));
    avgclr += realcolor(vec2(0.39, 0.39));
    avgclr += realcolor(vec2(0.39, -0.39));
    avgclr += realcolor(vec2(-0.39, 0.39));
    avgclr += realcolor(vec2(-0.39, -0.39));
    avgclr += realcolor(vec2(0.40, 0.40));
    avgclr += realcolor(vec2(0.40, -0.40));
    avgclr += realcolor(vec2(-0.40, 0.40));
    avgclr += realcolor(vec2(-0.40, -0.40));
    avgclr += realcolor(vec2(0.41, 0.41));
    avgclr += realcolor(vec2(0.41, -0.41));
    avgclr += realcolor(vec2(-0.41, 0.41));
    avgclr += realcolor(vec2(-0.41, -0.41));
     
    avgclr += realcolor(vec2(0.42, 0.42));
    avgclr += realcolor(vec2(0.42, -0.42));
    avgclr += realcolor(vec2(-0.42, 0.42));
    avgclr += realcolor(vec2(-0.42, -0.42));
    avgclr += realcolor(vec2(0.43, 0.43));
    avgclr += realcolor(vec2(0.43, -0.43));
    avgclr += realcolor(vec2(-0.43, 0.43));
    avgclr += realcolor(vec2(-0.43, -0.43));
    avgclr += realcolor(vec2(0.44, 0.44));
    avgclr += realcolor(vec2(0.44, -0.44));
    avgclr += realcolor(vec2(-0.44, 0.44));
    avgclr += realcolor(vec2(-0.44, -0.44));
    avgclr += realcolor(vec2(0.45, 0.45));
    avgclr += realcolor(vec2(0.45, -0.45));
    avgclr += realcolor(vec2(-0.45, 0.45));
    avgclr += realcolor(vec2(-0.45, -0.45));
    avgclr += realcolor(vec2(0.46, 0.46));
    avgclr += realcolor(vec2(0.46, -0.46));
    avgclr += realcolor(vec2(-0.46, 0.46));
    avgclr += realcolor(vec2(-0.46, -0.46));
    avgclr += realcolor(vec2(0.47, 0.47));
    avgclr += realcolor(vec2(0.47, -0.47));
    avgclr += realcolor(vec2(-0.47, 0.47));
    avgclr += realcolor(vec2(-0.47, -0.47));
    avgclr += realcolor(vec2(0.48, 0.48));
    avgclr += realcolor(vec2(0.48, -0.48));
    avgclr += realcolor(vec2(-0.48, 0.48));
    avgclr += realcolor(vec2(-0.48, -0.48));
    avgclr += realcolor(vec2(0.49, 0.49));
    avgclr += realcolor(vec2(0.49, -0.49));
    avgclr += realcolor(vec2(-0.49, 0.49));
    avgclr += realcolor(vec2(-0.49, -0.49));
    //scale exposure control
    avgclr = 1/(clamp(avgclr/200.0, 0.0, 1.0)+0.5)*HDR_RANGE - HDR_RANGE;
    if (avgclr < 0) {
      avgclr = 0;
    }
     
       //modulate colors inversely proportional to average color
     
     
    color.r = color.r + color.r*((avgclr)) + (0.01*avgclr);
    color.g = color.g + color.g*((avgclr)) + (0.01*avgclr);
    color.b = color.b + color.b*((avgclr)) + (0.01*avgclr);
     
    #endif;
    #ifdef CROSSPROCESS
    //pre-gain
    color.r = color.r * (BRIGHTMULT + 0.0) + 0.03;
    color.g = color.g * (BRIGHTMULT + 0.0) + 0.03;
    color.b = color.b * (BRIGHTMULT + 0.0) + 0.03;
    //compensate for low-light artifacts
    color = color+0.029;
    //calculate double curve
    float dbr = -color.r + 1.4;
    float dbg = -color.g + 1.4;
    float dbb = -color.b + 1.4;
    //fade between simple gamma up curve and double curve
    float pr = mix(dbr, 0.65, 0.7);
    float pg = mix(dbg, 0.65, 0.7);
    float pb = mix(dbb, 0.75, 0.7);
    color.r = pow((color.r * 0.99 - 0.02), pr);
    color.g = pow((color.g * 0.99 - 0.015), pg);
    color.b = pow((color.b * 0.90 + 0.01), pb);
    #endif
    #ifdef HIGHDESATURATE
    //desaturate technique (choose one)
    //average
    float rgb = max(color.r, max(color.g, color.B))/2 + min(color.r, min(color.g, color.B))/2;
    //adjust black and white image to be brighter
    float bw = pow(rgb, 0.7);
    //mix between per-channel analysis and average analysis
    float rgbr = mix(rgb, color.r, 0.7);
    float rgbg = mix(rgb, color.g, 0.7);
    float rgbb = mix(rgb, color.b, 0.7);
    //calculate crossfade based on lum
    float mixfactorr = max(0.0, (rgbr*2 - 1));
    float mixfactorg = max(0.0, (rgbg*2 - 1));
    float mixfactorb = max(0.0, (rgbb*2 - 1));
    //crossfade between saturated and desaturated image
    float mixr = mix(color.r, bw, mixfactorr);
    float mixg = mix(color.g, bw, mixfactorg);
    float mixb = mix(color.b, bw, mixfactorb);
    //adjust level of desaturation
    color.r = clamp((mix(mixr, color.r, 0.1)), 0.0, 1.0);
    color.g = clamp((mix(mixg, color.g, 0.1)), 0.0, 1.0);
    color.b = clamp((mix(mixb, color.b, 0.1)), 0.0, 1.0);
    //desaturate blue channel
    color.b = color.b*0.9 + ((color.r + color.g)/2.0)*0.1;
    //hold color values for color boost
    //vec4 hld = color;
    
    //Color boosting
    color.r = (color.r)*(COLOR_BOOST + 1.0) + (color.g + color.B)*(-COLOR_BOOST);
    color.g = (color.g)*(COLOR_BOOST + 1.0) + (color.r + color.B)*(-COLOR_BOOST);
    color.b = (color.B)*(COLOR_BOOST + 1.0) + (color.r + color.g)*(-COLOR_BOOST);
    //color.r = mix(((color.r)*(COLOR_BOOST + 1.0) + (hld.g + hld.B)*(-COLOR_BOOST)), hld.r, (max(((1-rgb)*2 - 1), 0.0)));
    //color.g = mix(((color.g)*(COLOR_BOOST + 1.0) + (hld.r + hld.B)*(-COLOR_BOOST)), hld.g, (max(((1-rgb)*2 - 1), 0.0)));
    //color.b = mix(((color.B)*(COLOR_BOOST + 1.0) + (hld.r + hld.g)*(-COLOR_BOOST)), hld.b, (max(((1-rgb)*2 - 1), 0.0)));
    //undo artifact compensation
    color = max(((color*1.10) - 0.06), 0.0);
    color = color * BRIGHTMULT;
    color.r = pow(color.r, GAMMA);
    color.g = pow(color.g, GAMMA);
    color.b = pow(color.b, GAMMA);
    color = color*(1.0 + DARKMULT) - DARKMULT;
    #endif
    gl_FragColor = color;
    // End of Main. -----------------
    }
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.7.3][SSP] Survivalism [v1.4.5] [Update in progress]
    I also would love to see energy and thirst in the game :smile.gif:
    Posted in: Minecraft Mods
  • 0

    posted a message on OptiFine HD (FPS Boost, Dynamic Lights, Shaders and much more)
    Good work man, but any chance for a multi threaded 1.0.0?
    Posted in: Minecraft Mods
  • 0

    posted a message on Simulated HDR idea
    Ok, remember playing Halflife 2 and going into a dark area where your virtual eyes begin to adjust and everything brightens a bit? And then you go back outside and everything darkens a bit to even out the bright? All one would have to do, is adjust the brightness that the new lighting engine permits, based on how long one is in the dark or in the light.
    Anyone interested?
    Posted in: Requests / Ideas For Mods
  • 0

    posted a message on [1.3.1] GLSL Shaders (DoF, Bump Mapping, Waving Wheat, Dynamic Shadows, and More!)
    This work for 1.5_1 yet?
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.4.7] ejhopkins Wild Grass v16.0 updated for Forge
    Quote from ejhopkins »
    Quote from belfedia »

    It isn't possible because the random grass heights depend on information saved to the blocks metadata. It is the only way to have a consistent height that does not change with every single render pass. If i simply based grass height on biome temp and humidity, then grass near each other would all look exactly the same and seem very tiled. I wish there was a way too, I'm sorry.

    Ah I understand. Either way keep up the great work. :smile.gif:
    I was wondering though, for online play without a server mod, whats stopping you from simply randomly assigning a grass height to the chunks as they are sent to you? Doesn't matter if they change when the chunk unloads in my opinion. Would this be plausible?
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.4.7] ejhopkins Wild Grass v16.0 updated for Forge
    Quote from aSakofDonuts »
    this works on smp without modding the server, ive actually only tested it on smp servers

    i use the "modloader_terrain" one i copied all the highlighted files to my minecraft.jar


    i use John smith texture pack for my terrain.png

    This is what my game looks like

    Doing what you said resulted in exactly the same thing. Still doesn't work in SMP. >:l
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.4.7] ejhopkins Wild Grass v16.0 updated for Forge
    So why can't this work in SMP without modding the server? Maybe I just want to log into other servers and enjoy this? >:l
    it USED to work without modding the server god damnit.
    Posted in: Minecraft Mods
  • 0

    posted a message on (server idea) RedvsBlue/ace of spades minecraft server idea
    bump for interest until server is made.
    Posted in: Server Support and Administration
  • 0

    posted a message on [V1.3] Optimine (FPS Boost) [OPTIMIZATION] *UPDATED*
    Yeah an update would be nice. My netbook is dying for minecraft.
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.3.1] GLSL Shaders (DoF, Bump Mapping, Waving Wheat, Dynamic Shadows, and More!)
    Out of curiosity, was a dynamic shadow shader ever made? I'd do a search but that feature is STILL ****ING DISABLED. WHY DO THEY DO THIS TO ME.
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.3.1] GLSL Shaders (DoF, Bump Mapping, Waving Wheat, Dynamic Shadows, and More!)
    Surprise Surprise, latest doesn't work for ATI 6870s. :l No blackscreen, it just doesn't show any effect. Yay.
    Posted in: Minecraft Mods
  • 0

    posted a message on [IDEA] Blowing Grass Effect
    Yeah those are pretty cool shaders, theres one that does the same for the wild grass mod. It's a little too busy in my opinion. What I have envisioned for the grass effect is something a bit more subtle. Thanks for the reply :ohmy.gif:
    Posted in: Mods Discussion
  • 0

    posted a message on [IDEA] Blowing Grass Effect
    You know how the water has a really nice and simple looking wave effect? Why not apply something like that to the grass texture? Maybe have it flow in waves with the direction of the clouds? If I knew how the water texture worked I'd try modding it.
    Posted in: Mods Discussion
  • To post a comment, please or register a new account.