• 0

    posted a message on [128x] [1.2.3] Equilibrium v.0.9.4
    Quote from Neox_RS

    Amazing texture pack, and seriously, I love what you did with wools, keep that up!

    What else would you like to see in wool section? There is six more wools available.
    Posted in: Resource Packs
  • 0

    posted a message on [1.3.1] GLSL Shaders (DoF, Bump Mapping, Waving Wheat, Dynamic Shadows, and More!)
    Quote from EbilCookie

    2) I cant find the alternetive shaders in my .Nitrous folder.

    Me too. I take them from archive. Shaders-Windows.zip\Shaders\mods\shaders\alternative shaders
    Posted in: Minecraft Mods
  • 0

    posted a message on [128x] [1.2.3] Equilibrium v.0.9.4
    I solved my problem. It was because I used OptiFine through MCPatcher. They can work together if you turn off some features of MCP but this atrifacts was the downside. Don't know what to do next really... Magic Launcher, which recommended with OrtiFine, patches jar exactly before the launch (as far as I understand), so I can't use GLSL shaders after that. Is there any good patchers (mod organizers) beside this two?
    Posted in: Resource Packs
  • 0

    posted a message on [Launcher] Magic Launcher 1.3.4 (mods, options, profiles, news)
    Thing I don't like about this (otherwise great) patcher is that I can't use GLSL shaders with it. They need to be installed after all the mods to work and I can't do it because of the way this launcher patches the jar. Also, I can't instal shaders as mod because they have their own installer. It's so frustrating.
    Is there a way to solve this problem? I mean use MagicPatcher with GLSL Shaders mod?
    Posted in: Minecraft Tools
  • 0

    posted a message on [1.3.1] GLSL Shaders (DoF, Bump Mapping, Waving Wheat, Dynamic Shadows, and More!)
    I solved my problem. It was because I used OptiFine through MCPatcher. They can work together if you turn off some features of MCP but this atrifacts was the downside. Don't know what to do next really... Magic Launcher, which recommended with OrtiFine, patches jar exactly before the launch (as far as I understand), so I can't use GLSL shaders after that. Is there any good patchers beside this two?
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.3.1] GLSL Shaders (DoF, Bump Mapping, Waving Wheat, Dynamic Shadows, and More!)
    Quote from joshtemplin3

    Is there a manual install? Because installers don't work for me.



    Edit: The installer worked, but when I started a world, it went from a dark to blue color. My Graphics Card info: Intel GMA X3100 144 MB


    Here is what I found in SEUS thread:
    Void of blue (all blue screen)
    This seems to happen on all Intel gpu's. Unless Intel comes out with new drivers, this is unsolvable.

    ...



    Quote from Grugsy

    does it flicker at the seams like the 3d chest textures do? I had a similar issue quite a few months ago with one of the mod builds.... it was an issue between my video cards(ati) texture filtering settings and the mod. ( but only when using bumpmaps that do not have the height in alpha.)

    They do not flicker when you stand still. When you move they kinda flicker, but this is just some crazy pixels which come and go out of sight. Chest textures overlaps each other, but here they do not joined properly, as it seems.
    ...



    This is what I found in main post:
    The new version of the mod does not yet include anti-aliasing options. However, you can use it to get clean MSAA anti-aliasing without artifacts by forcefully enabling MSAA in your graphics card's control panel, then marking the texture coordinates as "centroid" in the shaders (by changing "varying vec4 texcoord" to "centroid varying vec4 texcoord" wherever you see it).

    This 'artifacts' from forced AA looks pretty similar to my 'gaps'. If this fixes AA, maybe it will fix bumps as well. Can someone explain to me where exactly I need to change this lines and will it work on shader maps as well as textures?
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.3.1] GLSL Shaders (DoF, Bump Mapping, Waving Wheat, Dynamic Shadows, and More!)
    Quote from MamiyaOtaru

    The bumpmap on the left has some pretty obvious lines running along the edges. That will mean a disconnect in game. The one on the right does look pretty good to the naked eye, though any discrepancies become pretty obvious with bumpmaps. I bet they look better in game than the ones on the left though

    It's not really disconnects between texture patterns. It's more like holes. You can't see it on screenshot though, only in motion. Here's the screenshot of my textures in game. It looks the same to me. Maybe even worse.

    And this is what happening when I leave both maps totally blank.
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.3.1] GLSL Shaders (DoF, Bump Mapping, Waving Wheat, Dynamic Shadows, and More!)
    Quote from MamiyaOtaru

    Looks like the texture tiles well, but the bump map does not. Nothing Dax can do about that. Whoever made the bumpmap needs to make it tile better

    This is bump maps of cobblestone from LB Photo Realism (left) and Equilibrium (right). I got the same troubles with both. And I think they (at least mine) are tiled pretty good. I guess you can see where the textures combines (if you look really good) but there is no gaps or missed pixels. Anyway, here is 3x3 textures to see the seams. Tell me what is wrong with them?

    If someone uses the LB Photo Realism 128x pack with this mod, please, test it for this particular issues and post the results here. (I got the same results on ATI and nVidia cards.) If you using another pack and bump mapping works fine with it, please, give me the link so I can test it too.
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.3.1] GLSL Shaders (DoF, Bump Mapping, Waving Wheat, Dynamic Shadows, and More!)
    Quote from Zeak92

    I have AMD Radeon 6870, on the wiki it says the everything works fine. I got no problem with the install and when I create a new world it doesn't have the shaders :/

    Do you mean bumps? By default there is only DoF and grass as far as I know. Use alternative shaders: 'bump-mapping' or 'bumps-shadows-optifine_required'. Also you don't have to create new world for shaders to work, but make sure the texture pack has the shader maps.
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.3.1] GLSL Shaders (DoF, Bump Mapping, Waving Wheat, Dynamic Shadows, and More!)
    daxnitro, please, check out this issue with bump mapping. I guess this isn't the most major bug, but it can easily ruin the mod for me. It's occurring only with bumps and not with DoF or shadows. Here's two examples. I was using LB Photo Realism x128 this time. Firstly with shadows-optifine_required:

    Textures fits each other perfectly.

    And here is bumps-shadows-optifine_required (but with bumps only I got the same result):

    You can see definite gaps between textures. In motion it looks much worse and makes impossible comfortable use of the mod.
    Something like this happens when you force anti-aliasing or anisotripoc filtering with HD textures. But optifine fixed this with special AA version of the mod. Maybe their expirience can be helpful. Or maybe optifine can fix this too as soon, as AA version for 1.1 will be released. Anyway I like to draw your attention to this problem.
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.3.1] GLSL Shaders (DoF, Bump Mapping, Waving Wheat, Dynamic Shadows, and More!)
    Quote from eguy123

    this is my chipset model ATI Radeon HD 2400 will this mod work for me if i install optifine standard with it ? looks great please reply :Diamond: :Diamond: :Diamond:

    I doubt it. This mod eats FPS like crazy. I had to lower render distance to stay in comfort range of 30-60 FPS with HD5870 and 128x texture pack. Also look here.
    Posted in: Minecraft Mods
  • 0

    posted a message on [128x] [1.2.3] Equilibrium v.0.9.4
    It seems like info in GLSL thread/wiki is somewhat outdated. I've searched already.
    ...

    And some of lines that you suggested turns off DoF indeed. But in the same time they disables some other shading effects. Though the real trouble is #2. If this will not be fixed by mod's authors, I doubt I will use it.
    Posted in: Resource Packs
  • 0

    posted a message on [128x] [1.2.3] Equilibrium v.0.9.4
    There is no such line as #define USE_DOF.
    Using bumps-shadows-optifine_required alternative shaders.
    Here is what I have in final.fsh:

    #version 120

    // More realistic depth-of-field by Azraeil.
    // This is a modification of Daxnitro's depth-of-field shader.

    // If you want a higher quality blur, remove the forward slashes from the following line:
    #define USE_HIGH_QUALITY_BLUR

    uniform sampler2D gcolor;
    uniform sampler2D gdepth;
    uniform sampler2D gnormal;
    uniform sampler2D composite;

    varying vec4 texcoord;

    uniform float aspectRatio;
    uniform float near;
    uniform float far;

    // HYPERFOCAL = (Focal Distance ^ 2)/(Circle of Confusion * F Stop) + Focal Distance
    const float HYPERFOCAL = 3.132;
    const float PICONSTANT = 3.14159;

    float getDepth(vec2 coord);
    vec4 getBlurredColor();
    vec4 getSample(vec2 coord, vec2 aspectCorrection);
    vec4 getSampleWithBoundsCheck(vec2 offset);

    float samples = 0.0;
    vec2 space;

    void main() {
    vec4 baseColor = texture2D(composite, texcoord.st);

    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) {
    gl_FragColor = mix(baseColor, getBlurredColor(), mixAmount);
    } else {
    gl_FragColor = baseColor;
    }
    }

    float getDepth(vec2 coord) {
    return 2.0 * near * far / (far + near - (2.0 * texture2D(gdepth, coord).x - 1.0) * (far - near));
    }

    vec4 getBlurredColor() {
    vec4 blurredColor = vec4(0.0);
    float depth = getDepth(texcoord.xy);
    vec2 aspectCorrection = vec2(1.0, aspectRatio) * 0.005;

    vec2 ac0_4 = 0.4 * aspectCorrection; // 0.4
    #ifdef USE_HIGH_QUALITY_BLUR
    vec2 ac0_4x0_4 = 0.4 * ac0_4; // 0.16
    vec2 ac0_4x0_7 = 0.7 * ac0_4; // 0.28
    #endif

    vec2 ac0_29 = 0.29 * aspectCorrection; // 0.29
    #ifdef USE_HIGH_QUALITY_BLUR
    vec2 ac0_29x0_7 = 0.7 * ac0_29; // 0.203
    vec2 ac0_29x0_4 = 0.4 * ac0_29; // 0.116
    #endif

    vec2 ac0_15 = 0.15 * aspectCorrection; // 0.15
    vec2 ac0_37 = 0.37 * aspectCorrection; // 0.37
    #ifdef USE_HIGH_QUALITY_BLUR
    vec2 ac0_15x0_9 = 0.9 * ac0_15; // 0.135
    vec2 ac0_37x0_9 = 0.37 * ac0_37; // 0.1369
    #endif

    vec2 lowSpace = texcoord.st;
    vec2 highSpace = 1.0 - lowSpace;
    space = vec2(min(lowSpace.s, highSpace.s), min(lowSpace.t, highSpace.t));

    if (space.s >= ac0_4.s && space.t >= ac0_4.t) {

    blurredColor += texture2D(composite, texcoord.st + vec2(0.0, ac0_4.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(ac0_4.s, 0.0));
    blurredColor += texture2D(composite, texcoord.st + vec2(0.0, -ac0_4.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(-ac0_4.s, 0.0));

    #ifdef USE_HIGH_QUALITY_BLUR
    blurredColor += texture2D(composite, texcoord.st + vec2(ac0_4x0_7.s, 0.0));
    blurredColor += texture2D(composite, texcoord.st + vec2(0.0, -ac0_4x0_7.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(-ac0_4x0_7.s, 0.0));
    blurredColor += texture2D(composite, texcoord.st + vec2(0.0, ac0_4x0_7.t));

    blurredColor += texture2D(composite, texcoord.st + vec2(ac0_4x0_4.s, 0.0));
    blurredColor += texture2D(composite, texcoord.st + vec2(0.0, -ac0_4x0_4.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(-ac0_4x0_4.s, 0.0));
    blurredColor += texture2D(composite, texcoord.st + vec2(0.0, ac0_4x0_4.t));
    #endif

    blurredColor += texture2D(composite, texcoord.st + vec2(ac0_29.s, -ac0_29.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(ac0_29.s, ac0_29.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(-ac0_29.s, ac0_29.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(-ac0_29.s, -ac0_29.t));

    #ifdef USE_HIGH_QUALITY_BLUR
    blurredColor += texture2D(composite, texcoord.st + vec2(ac0_29x0_7.s, ac0_29x0_7.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(ac0_29x0_7.s, -ac0_29x0_7.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(-ac0_29x0_7.s, ac0_29x0_7.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(-ac0_29x0_7.s, -ac0_29x0_7.t));

    blurredColor += texture2D(composite, texcoord.st + vec2(ac0_29x0_4.s, ac0_29x0_4.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(ac0_29x0_4.s, -ac0_29x0_4.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(-ac0_29x0_4.s, ac0_29x0_4.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(-ac0_29x0_4.s, -ac0_29x0_4.t));
    #endif

    blurredColor += texture2D(composite, texcoord.st + vec2(ac0_15.s, ac0_37.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(-ac0_37.s, ac0_15.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(ac0_37.s, -ac0_15.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(-ac0_15.s, -ac0_37.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(-ac0_15.s, ac0_37.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(ac0_37.s, ac0_15.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(-ac0_37.s, -ac0_15.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(ac0_15.s, -ac0_37.t));

    #ifdef USE_HIGH_QUALITY_BLUR
    blurredColor += texture2D(composite, texcoord.st + vec2(ac0_15x0_9.s, ac0_37x0_9.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(-ac0_37x0_9.s, ac0_15x0_9.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(ac0_37x0_9.s, -ac0_15x0_9.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(-ac0_15x0_9.s, -ac0_37x0_9.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(-ac0_15x0_9.s, ac0_37x0_9.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(ac0_37x0_9.s, ac0_15x0_9.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(-ac0_37x0_9.s, -ac0_15x0_9.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(ac0_15x0_9.s, -ac0_37x0_9.t));
    #endif

    #ifdef USE_HIGH_QUALITY_BLUR
    blurredColor /= 41.0;
    #else
    blurredColor /= 16.0;
    #endif

    } else {

    blurredColor += getSampleWithBoundsCheck(vec2(0.0, ac0_4.t));
    blurredColor += getSampleWithBoundsCheck(vec2(ac0_4.s, 0.0));
    blurredColor += getSampleWithBoundsCheck(vec2(0.0, -ac0_4.t));
    blurredColor += getSampleWithBoundsCheck(vec2(-ac0_4.s, 0.0));

    #ifdef USE_HIGH_QUALITY_BLUR
    blurredColor += getSampleWithBoundsCheck(vec2(ac0_4x0_7.s, 0.0));
    blurredColor += getSampleWithBoundsCheck(vec2(0.0, -ac0_4x0_7.t));
    blurredColor += getSampleWithBoundsCheck(vec2(-ac0_4x0_7.s, 0.0));
    blurredColor += getSampleWithBoundsCheck(vec2(0.0, ac0_4x0_7.t));

    blurredColor += getSampleWithBoundsCheck(vec2(ac0_4x0_4.s, 0.0));
    blurredColor += getSampleWithBoundsCheck(vec2(0.0, -ac0_4x0_4.t));
    blurredColor += getSampleWithBoundsCheck(vec2(-ac0_4x0_4.s, 0.0));
    blurredColor += getSampleWithBoundsCheck(vec2(0.0, ac0_4x0_4.t));
    #endif

    blurredColor += getSampleWithBoundsCheck(vec2(ac0_29.s, -ac0_29.t));
    blurredColor += getSampleWithBoundsCheck(vec2(ac0_29.s, ac0_29.t));
    blurredColor += getSampleWithBoundsCheck(vec2(-ac0_29.s, ac0_29.t));
    blurredColor += getSampleWithBoundsCheck(vec2(-ac0_29.s, -ac0_29.t));

    #ifdef USE_HIGH_QUALITY_BLUR
    blurredColor += getSampleWithBoundsCheck(vec2(ac0_29x0_7.s, ac0_29x0_7.t));
    blurredColor += getSampleWithBoundsCheck(vec2(ac0_29x0_7.s, -ac0_29x0_7.t));
    blurredColor += getSampleWithBoundsCheck(vec2(-ac0_29x0_7.s, ac0_29x0_7.t));
    blurredColor += getSampleWithBoundsCheck(vec2(-ac0_29x0_7.s, -ac0_29x0_7.t));

    blurredColor += getSampleWithBoundsCheck(vec2(ac0_29x0_4.s, ac0_29x0_4.t));
    blurredColor += getSampleWithBoundsCheck(vec2(ac0_29x0_4.s, -ac0_29x0_4.t));
    blurredColor += getSampleWithBoundsCheck(vec2(-ac0_29x0_4.s, ac0_29x0_4.t));
    blurredColor += getSampleWithBoundsCheck(vec2(-ac0_29x0_4.s, -ac0_29x0_4.t));
    #endif

    blurredColor += getSampleWithBoundsCheck(vec2(ac0_15.s, ac0_37.t));
    blurredColor += getSampleWithBoundsCheck(vec2(-ac0_37.s, ac0_15.t));
    blurredColor += getSampleWithBoundsCheck(vec2(ac0_37.s, -ac0_15.t));
    blurredColor += getSampleWithBoundsCheck(vec2(-ac0_15.s, -ac0_37.t));
    blurredColor += getSampleWithBoundsCheck(vec2(-ac0_15.s, ac0_37.t));
    blurredColor += getSampleWithBoundsCheck(vec2(ac0_37.s, ac0_15.t));
    blurredColor += getSampleWithBoundsCheck(vec2(-ac0_37.s, -ac0_15.t));
    blurredColor += getSampleWithBoundsCheck(vec2(ac0_15.s, -ac0_37.t));

    #ifdef USE_HIGH_QUALITY_BLUR
    blurredColor += getSampleWithBoundsCheck(vec2(ac0_15x0_9.s, ac0_37x0_9.t));
    blurredColor += getSampleWithBoundsCheck(vec2(-ac0_37x0_9.s, ac0_15x0_9.t));
    blurredColor += getSampleWithBoundsCheck(vec2(ac0_37x0_9.s, -ac0_15x0_9.t));
    blurredColor += getSampleWithBoundsCheck(vec2(-ac0_15x0_9.s, -ac0_37x0_9.t));
    blurredColor += getSampleWithBoundsCheck(vec2(-ac0_15x0_9.s, ac0_37x0_9.t));
    blurredColor += getSampleWithBoundsCheck(vec2(ac0_37x0_9.s, ac0_15x0_9.t));
    blurredColor += getSampleWithBoundsCheck(vec2(-ac0_37x0_9.s, -ac0_15x0_9.t));
    blurredColor += getSampleWithBoundsCheck(vec2(ac0_15x0_9.s, -ac0_37x0_9.t));
    #endif

    blurredColor /= samples;

    }

    return blurredColor;
    }

    vec4 getSampleWithBoundsCheck(vec2 offset) {
    vec2 coord = texcoord.st + offset;
    if (coord.s <= 1.0 && coord.s >= 0.0 && coord.t <= 1.0 && coord.t >= 0.0) {
    samples += 1.0;
    return texture2D(composite, coord);
    } else {
    return vec4(0.0);
    }
    }
    Posted in: Resource Packs
  • 0

    posted a message on [128x] [1.2.3] Equilibrium v.0.9.4
    Began the work on shader maps.
    Here is a little peek:





    Also, I am having some troubles with GLSL mod.

    1. Don't know how to turn off the DoF.
    2. There is small flashing gaps between blocks (you can actually see it in screenshots somewhere). What causes this and can it be fixed? (No AA of anisotropic filtering are forced.)
    3. Also there is very annoying shading effect on sun texture. Why is it there and can it be removed?

    I've posted in GLSL-thread already, but maybe here I'll get some answers quicker.
    Posted in: Resource Packs
  • 0

    posted a message on [1.3.1] GLSL Shaders (DoF, Bump Mapping, Waving Wheat, Dynamic Shadows, and More!)
    I use 'bumps-shadows-optifine' shaders with last version of the mod and I like to turn off the DoF. I've searched for the answers in this thread, but it seems like they do not work anymore. There is no 'ENABLE_DOF' line in final.fsh but plenty 'USE_HIGH_QUALITY_BLUR' and I don't know where to place '//'. Maybe everywhere... Can someone tell me?

    Hele is the content of final.fsh
    #version 120

    // More realistic depth-of-field by Azraeil.
    // This is a modification of Daxnitro's depth-of-field shader.

    // If you want a higher quality blur, remove the forward slashes from the following line:
    #define USE_HIGH_QUALITY_BLUR

    uniform sampler2D gcolor;
    uniform sampler2D gdepth;
    uniform sampler2D gnormal;
    uniform sampler2D composite;

    varying vec4 texcoord;

    uniform float aspectRatio;
    uniform float near;
    uniform float far;

    // HYPERFOCAL = (Focal Distance ^ 2)/(Circle of Confusion * F Stop) + Focal Distance
    const float HYPERFOCAL = 3.132;
    const float PICONSTANT = 3.14159;

    float getDepth(vec2 coord);
    vec4 getBlurredColor();
    vec4 getSample(vec2 coord, vec2 aspectCorrection);
    vec4 getSampleWithBoundsCheck(vec2 offset);

    float samples = 0.0;
    vec2 space;

    void main() {
    vec4 baseColor = texture2D(composite, texcoord.st);

    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) {
    gl_FragColor = mix(baseColor, getBlurredColor(), mixAmount);
    } else {
    gl_FragColor = baseColor;
    }
    }

    float getDepth(vec2 coord) {
    return 2.0 * near * far / (far + near - (2.0 * texture2D(gdepth, coord).x - 1.0) * (far - near));
    }

    vec4 getBlurredColor() {
    vec4 blurredColor = vec4(0.0);
    float depth = getDepth(texcoord.xy);
    vec2 aspectCorrection = vec2(1.0, aspectRatio) * 0.005;

    vec2 ac0_4 = 0.4 * aspectCorrection; // 0.4
    #ifdef USE_HIGH_QUALITY_BLUR
    vec2 ac0_4x0_4 = 0.4 * ac0_4; // 0.16
    vec2 ac0_4x0_7 = 0.7 * ac0_4; // 0.28
    #endif

    vec2 ac0_29 = 0.29 * aspectCorrection; // 0.29
    #ifdef USE_HIGH_QUALITY_BLUR
    vec2 ac0_29x0_7 = 0.7 * ac0_29; // 0.203
    vec2 ac0_29x0_4 = 0.4 * ac0_29; // 0.116
    #endif

    vec2 ac0_15 = 0.15 * aspectCorrection; // 0.15
    vec2 ac0_37 = 0.37 * aspectCorrection; // 0.37
    #ifdef USE_HIGH_QUALITY_BLUR
    vec2 ac0_15x0_9 = 0.9 * ac0_15; // 0.135
    vec2 ac0_37x0_9 = 0.37 * ac0_37; // 0.1369
    #endif

    vec2 lowSpace = texcoord.st;
    vec2 highSpace = 1.0 - lowSpace;
    space = vec2(min(lowSpace.s, highSpace.s), min(lowSpace.t, highSpace.t));

    if (space.s >= ac0_4.s && space.t >= ac0_4.t) {

    blurredColor += texture2D(composite, texcoord.st + vec2(0.0, ac0_4.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(ac0_4.s, 0.0));
    blurredColor += texture2D(composite, texcoord.st + vec2(0.0, -ac0_4.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(-ac0_4.s, 0.0));

    #ifdef USE_HIGH_QUALITY_BLUR
    blurredColor += texture2D(composite, texcoord.st + vec2(ac0_4x0_7.s, 0.0));
    blurredColor += texture2D(composite, texcoord.st + vec2(0.0, -ac0_4x0_7.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(-ac0_4x0_7.s, 0.0));
    blurredColor += texture2D(composite, texcoord.st + vec2(0.0, ac0_4x0_7.t));

    blurredColor += texture2D(composite, texcoord.st + vec2(ac0_4x0_4.s, 0.0));
    blurredColor += texture2D(composite, texcoord.st + vec2(0.0, -ac0_4x0_4.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(-ac0_4x0_4.s, 0.0));
    blurredColor += texture2D(composite, texcoord.st + vec2(0.0, ac0_4x0_4.t));
    #endif

    blurredColor += texture2D(composite, texcoord.st + vec2(ac0_29.s, -ac0_29.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(ac0_29.s, ac0_29.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(-ac0_29.s, ac0_29.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(-ac0_29.s, -ac0_29.t));

    #ifdef USE_HIGH_QUALITY_BLUR
    blurredColor += texture2D(composite, texcoord.st + vec2(ac0_29x0_7.s, ac0_29x0_7.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(ac0_29x0_7.s, -ac0_29x0_7.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(-ac0_29x0_7.s, ac0_29x0_7.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(-ac0_29x0_7.s, -ac0_29x0_7.t));

    blurredColor += texture2D(composite, texcoord.st + vec2(ac0_29x0_4.s, ac0_29x0_4.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(ac0_29x0_4.s, -ac0_29x0_4.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(-ac0_29x0_4.s, ac0_29x0_4.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(-ac0_29x0_4.s, -ac0_29x0_4.t));
    #endif

    blurredColor += texture2D(composite, texcoord.st + vec2(ac0_15.s, ac0_37.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(-ac0_37.s, ac0_15.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(ac0_37.s, -ac0_15.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(-ac0_15.s, -ac0_37.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(-ac0_15.s, ac0_37.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(ac0_37.s, ac0_15.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(-ac0_37.s, -ac0_15.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(ac0_15.s, -ac0_37.t));

    #ifdef USE_HIGH_QUALITY_BLUR
    blurredColor += texture2D(composite, texcoord.st + vec2(ac0_15x0_9.s, ac0_37x0_9.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(-ac0_37x0_9.s, ac0_15x0_9.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(ac0_37x0_9.s, -ac0_15x0_9.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(-ac0_15x0_9.s, -ac0_37x0_9.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(-ac0_15x0_9.s, ac0_37x0_9.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(ac0_37x0_9.s, ac0_15x0_9.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(-ac0_37x0_9.s, -ac0_15x0_9.t));
    blurredColor += texture2D(composite, texcoord.st + vec2(ac0_15x0_9.s, -ac0_37x0_9.t));
    #endif

    #ifdef USE_HIGH_QUALITY_BLUR
    blurredColor /= 41.0;
    #else
    blurredColor /= 16.0;
    #endif

    } else {

    blurredColor += getSampleWithBoundsCheck(vec2(0.0, ac0_4.t));
    blurredColor += getSampleWithBoundsCheck(vec2(ac0_4.s, 0.0));
    blurredColor += getSampleWithBoundsCheck(vec2(0.0, -ac0_4.t));
    blurredColor += getSampleWithBoundsCheck(vec2(-ac0_4.s, 0.0));

    #ifdef USE_HIGH_QUALITY_BLUR
    blurredColor += getSampleWithBoundsCheck(vec2(ac0_4x0_7.s, 0.0));
    blurredColor += getSampleWithBoundsCheck(vec2(0.0, -ac0_4x0_7.t));
    blurredColor += getSampleWithBoundsCheck(vec2(-ac0_4x0_7.s, 0.0));
    blurredColor += getSampleWithBoundsCheck(vec2(0.0, ac0_4x0_7.t));

    blurredColor += getSampleWithBoundsCheck(vec2(ac0_4x0_4.s, 0.0));
    blurredColor += getSampleWithBoundsCheck(vec2(0.0, -ac0_4x0_4.t));
    blurredColor += getSampleWithBoundsCheck(vec2(-ac0_4x0_4.s, 0.0));
    blurredColor += getSampleWithBoundsCheck(vec2(0.0, ac0_4x0_4.t));
    #endif

    blurredColor += getSampleWithBoundsCheck(vec2(ac0_29.s, -ac0_29.t));
    blurredColor += getSampleWithBoundsCheck(vec2(ac0_29.s, ac0_29.t));
    blurredColor += getSampleWithBoundsCheck(vec2(-ac0_29.s, ac0_29.t));
    blurredColor += getSampleWithBoundsCheck(vec2(-ac0_29.s, -ac0_29.t));

    #ifdef USE_HIGH_QUALITY_BLUR
    blurredColor += getSampleWithBoundsCheck(vec2(ac0_29x0_7.s, ac0_29x0_7.t));
    blurredColor += getSampleWithBoundsCheck(vec2(ac0_29x0_7.s, -ac0_29x0_7.t));
    blurredColor += getSampleWithBoundsCheck(vec2(-ac0_29x0_7.s, ac0_29x0_7.t));
    blurredColor += getSampleWithBoundsCheck(vec2(-ac0_29x0_7.s, -ac0_29x0_7.t));

    blurredColor += getSampleWithBoundsCheck(vec2(ac0_29x0_4.s, ac0_29x0_4.t));
    blurredColor += getSampleWithBoundsCheck(vec2(ac0_29x0_4.s, -ac0_29x0_4.t));
    blurredColor += getSampleWithBoundsCheck(vec2(-ac0_29x0_4.s, ac0_29x0_4.t));
    blurredColor += getSampleWithBoundsCheck(vec2(-ac0_29x0_4.s, -ac0_29x0_4.t));
    #endif

    blurredColor += getSampleWithBoundsCheck(vec2(ac0_15.s, ac0_37.t));
    blurredColor += getSampleWithBoundsCheck(vec2(-ac0_37.s, ac0_15.t));
    blurredColor += getSampleWithBoundsCheck(vec2(ac0_37.s, -ac0_15.t));
    blurredColor += getSampleWithBoundsCheck(vec2(-ac0_15.s, -ac0_37.t));
    blurredColor += getSampleWithBoundsCheck(vec2(-ac0_15.s, ac0_37.t));
    blurredColor += getSampleWithBoundsCheck(vec2(ac0_37.s, ac0_15.t));
    blurredColor += getSampleWithBoundsCheck(vec2(-ac0_37.s, -ac0_15.t));
    blurredColor += getSampleWithBoundsCheck(vec2(ac0_15.s, -ac0_37.t));

    #ifdef USE_HIGH_QUALITY_BLUR
    blurredColor += getSampleWithBoundsCheck(vec2(ac0_15x0_9.s, ac0_37x0_9.t));
    blurredColor += getSampleWithBoundsCheck(vec2(-ac0_37x0_9.s, ac0_15x0_9.t));
    blurredColor += getSampleWithBoundsCheck(vec2(ac0_37x0_9.s, -ac0_15x0_9.t));
    blurredColor += getSampleWithBoundsCheck(vec2(-ac0_15x0_9.s, -ac0_37x0_9.t));
    blurredColor += getSampleWithBoundsCheck(vec2(-ac0_15x0_9.s, ac0_37x0_9.t));
    blurredColor += getSampleWithBoundsCheck(vec2(ac0_37x0_9.s, ac0_15x0_9.t));
    blurredColor += getSampleWithBoundsCheck(vec2(-ac0_37x0_9.s, -ac0_15x0_9.t));
    blurredColor += getSampleWithBoundsCheck(vec2(ac0_15x0_9.s, -ac0_37x0_9.t));
    #endif

    blurredColor /= samples;

    }

    return blurredColor;
    }

    vec4 getSampleWithBoundsCheck(vec2 offset) {
    vec2 coord = texcoord.st + offset;
    if (coord.s <= 1.0 && coord.s >= 0.0 && coord.t <= 1.0 && coord.t >= 0.0) {
    samples += 1.0;
    return texture2D(composite, coord);
    } else {
    return vec4(0.0);
    }
    }
    Please, point the exact spot for me.


    UPD
    Oh, and one more thing. There is small flashing gaps between blocks when I use bumps. Can it be fixed? (No AA of anisotropic filtering are forced.)


    UPD2
    Also there is very annoying effect on sun texture. Some kind of dark square thing. Why is it there and how can I remove it?
    ...

    And I use ATI card HD5870 with last drv, in case this info can help to resolve these problems.
    Posted in: Minecraft Mods
  • To post a comment, please .