Jump to content

stromblex

Members
  • Posts

    3
  • Joined

  • Last visited

  • Posts

    3
  • Joined

  • Last visited

About stromblex

  • Rank
    Newbie
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. 15:42:39 Mine-imator version 2.0 Pre-release 1 (2022-05-30) 15:42:39 OS: Windows 15:42:39 working_directory: C:/Users/strom/Mine-imator/ 15:42:39 user_directory: C:/Users/strom/Mine-imator/Data/ 15:42:39 OpenMP max threads: 4 15:42:39 Found temporary folder C:/Users/strom/AppData/Local/Temp/Mine-imator_tmp/ 15:42:39 OpenGL version: 3.3 15:42:39 Minecraft saves from C:/Users/strom/AppData/Roaming/.minecraft/saves 15:42:39 DPI: 96,96 15:42:39 GLSL version 400 15:42:40 [WARNING] Loading shader_add fragment shader failed 0(2) : warning C7568: #version 400 not fully supported on current GPU target profile 0(11) : error C1115: unable to find compatible overloaded function "textureQueryLod(sampler2D, vec2)" in App::Shader::Load:240 15:42:40 Fragment code: #version 400 #extension GL_ARB_explicit_attrib_location : enable uniform vec4[2] _uUvRect; uniform int[2] _uTexRepeat; layout(location = 0) out vec4 out_FragColor; vec4 _sampleUvRect(sampler2D s, vec4 uvRect, bool repeat, vec2 uv) { float lod = 0.0; vec2 uvLod = uvRect.xy + uv * uvRect.zw; uvLod.y = 1.0 - uvLod.y; lod = textureQueryLod(s, uvLod).y; if (repeat) uv = mod(uv, vec2(1.0, 1.0)); uv = uvRect.xy + uv * uvRect.zw; uv.y = 1.0 - uv.y; return textureLod(s, uv, lod); } uniform sampler2D _uBaseTexture; /// ----------------------------------- /// uniform sampler2D uAddTexture; uniform vec4 uBlendColor; uniform float uAmount; uniform float uPower; in vec2 vTexCoord; void main() { vec4 baseColor = _sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, vTexCoord); vec4 addColor = _sampleUvRect(uAddTexture, _uUvRect[1], _uTexRepeat[1] > 0, vTexCoord); addColor.rgb = pow(addColor.rgb, vec3(uPower)); float value = (addColor.r + addColor.g + addColor.b) / 3.0; addColor.a = value; vec4 finalColor; finalColor.rgb = baseColor.rgb + ((addColor.rgb * uBlendColor.rgb) * vec3(uAmount)); finalColor.a = min(baseColor.a + addColor.a, 1.0); out_FragColor = vec4(finalColor); } 15:42:40 [WARNING] Loading shader_alpha_fix fragment shader failed 0(2) : warning C7568: #version 400 not fully supported on current GPU target profile 0(11) : error C1115: unable to find compatible overloaded function "textureQueryLod(sampler2D, vec2)" in App::Shader::Load:240 15:42:40 Fragment code: #version 400 #extension GL_ARB_explicit_attrib_location : enable uniform vec4[1] _uUvRect; uniform int[1] _uTexRepeat; layout(location = 0) out vec4 out_FragColor; vec4 _sampleUvRect(sampler2D s, vec4 uvRect, bool repeat, vec2 uv) { float lod = 0.0; vec2 uvLod = uvRect.xy + uv * uvRect.zw; uvLod.y = 1.0 - uvLod.y; lod = textureQueryLod(s, uvLod).y; if (repeat) uv = mod(uv, vec2(1.0, 1.0)); uv = uvRect.xy + uv * uvRect.zw; uv.y = 1.0 - uv.y; return textureLod(s, uv, lod); } /// ----------------------------------- /// uniform sampler2D uTexture; // static uniform vec2 uTexScale; in vec2 vTexCoord; void main() { vec2 tex = vTexCoord; if (uTexScale.x < 1.0 || uTexScale.y < 1.0) tex = mod(tex * uTexScale, uTexScale); // GM sprite bug workaround vec4 baseColor = _sampleUvRect(uTexture, _uUvRect[0], _uTexRepeat[0] > 0, tex); if (baseColor.a == 0.0) discard; out_FragColor = vec4(0.0, 0.0, 0.0, baseColor.a); } 15:42:40 [WARNING] Loading shader_alpha_test fragment shader failed 0(2) : warning C7568: #version 400 not fully supported on current GPU target profile 0(11) : error C1115: unable to find compatible overloaded function "textureQueryLod(sampler2D, vec2)" in App::Shader::Load:240 15:42:40 Fragment code: #version 400 #extension GL_ARB_explicit_attrib_location : enable uniform vec4[1] _uUvRect; uniform int[1] _uTexRepeat; layout(location = 0) out vec4 out_FragColor; vec4 _sampleUvRect(sampler2D s, vec4 uvRect, bool repeat, vec2 uv) { float lod = 0.0; vec2 uvLod = uvRect.xy + uv * uvRect.zw; uvLod.y = 1.0 - uvLod.y; lod = textureQueryLod(s, uvLod).y; if (repeat) uv = mod(uv, vec2(1.0, 1.0)); uv = uvRect.xy + uv * uvRect.zw; uv.y = 1.0 - uv.y; return textureLod(s, uv, lod); } /// ----------------------------------- /// uniform sampler2D uTexture; // static uniform vec2 uTexScale; in vec2 vTexCoord; void main() { vec2 tex = vTexCoord; if (uTexScale.x < 1.0 || uTexScale.y < 1.0) tex = mod(tex * uTexScale, uTexScale); // GM sprite bug workaround vec4 baseColor = _sampleUvRect(uTexture, _uUvRect[0], _uTexRepeat[0] > 0, tex); if (baseColor.a >= 1.0) discard; out_FragColor = vec4(0.0, 0.0, 0.0, baseColor.a); } 15:42:40 [WARNING] Loading shader_blend fragment shader failed 0(2) : warning C7568: #version 400 not fully supported on current GPU target profile 0(11) : error C1115: unable to find compatible overloaded function "textureQueryLod(sampler2D, vec2)" in App::Shader::Load:240 15:42:40 Fragment code: #version 400 #extension GL_ARB_explicit_attrib_location : enable uniform vec4[1] _uUvRect; uniform int[1] _uTexRepeat; layout(location = 0) out vec4 out_FragColor; vec4 _sampleUvRect(sampler2D s, vec4 uvRect, bool repeat, vec2 uv) { float lod = 0.0; vec2 uvLod = uvRect.xy + uv * uvRect.zw; uvLod.y = 1.0 - uvLod.y; lod = textureQueryLod(s, uvLod).y; if (repeat) uv = mod(uv, vec2(1.0, 1.0)); uv = uvRect.xy + uv * uvRect.zw; uv.y = 1.0 - uv.y; return textureLod(s, uv, lod); } /// ----------------------------------- /// uniform sampler2D uTexture; // static uniform vec2 uTexScale; in vec2 vTexCoord; in vec4 vColor; void main() { vec2 tex = vTexCoord; if (uTexScale.x < 1.0 || uTexScale.y < 1.0) tex = mod(tex * uTexScale, uTexScale); // GM sprite bug workaround out_FragColor = vColor * _sampleUvRect(uTexture, _uUvRect[0], _uTexRepeat[0] > 0, tex); if (out_FragColor.a == 0.0) discard; } 15:42:40 [WARNING] Loading shader_blur fragment shader failed 0(2) : warning C7568: #version 400 not fully supported on current GPU target profile 0(11) : error C1115: unable to find compatible overloaded function "textureQueryLod(sampler2D, vec2)" in App::Shader::Load:240 15:42:40 Fragment code: #version 400 #extension GL_ARB_explicit_attrib_location : enable uniform vec4[1] _uUvRect; uniform int[1] _uTexRepeat; layout(location = 0) out vec4 out_FragColor; vec4 _sampleUvRect(sampler2D s, vec4 uvRect, bool repeat, vec2 uv) { float lod = 0.0; vec2 uvLod = uvRect.xy + uv * uvRect.zw; uvLod.y = 1.0 - uvLod.y; lod = textureQueryLod(s, uvLod).y; if (repeat) uv = mod(uv, vec2(1.0, 1.0)); uv = uvRect.xy + uv * uvRect.zw; uv.y = 1.0 - uv.y; return textureLod(s, uv, lod); } uniform sampler2D _uBaseTexture; /// ----------------------------------- /// in vec2 vTexCoord; uniform vec2 uScreenSize; uniform float uRadius; uniform vec2 uDirection; vec4 getColor(vec2 txcoord) { float xcoord = txcoord.x; float ycoord = txcoord.y; if(xcoord > 1.0) xcoord = 1.0 - (xcoord - 1.0); if(xcoord < 0.0) xcoord = xcoord * -1.0; if(ycoord > 1.0) ycoord = 1.0 - (ycoord - 1.0); if(ycoord < 0.0) ycoord = ycoord * -1.0; return _sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, vec2(xcoord, ycoord)); } void main() { vec4 blurResult = vec4(0.0); vec2 blurAmount = uRadius/uScreenSize; // 9-tap guassian filter blurResult += getColor(vec2(vTexCoord - 4.0 * blurAmount * uDirection)) * 0.0162162162; blurResult += getColor(vec2(vTexCoord - 3.0 * blurAmount * uDirection)) * 0.0540540541; blurResult += getColor(vec2(vTexCoord - 2.0 * blurAmount * uDirection)) * 0.1216216216; blurResult += getColor(vec2(vTexCoord - 1.0 * blurAmount * uDirection)) * 0.1945945946; blurResult += getColor(vec2(vTexCoord.x, vTexCoord.y)) * 0.2270270270; blurResult += getColor(vec2(vTexCoord + 1.0 * blurAmount * uDirection)) * 0.1945945946; blurResult += getColor(vec2(vTexCoord + 2.0 * blurAmount * uDirection)) * 0.1216216216; blurResult += getColor(vec2(vTexCoord + 3.0 * blurAmount * uDirection)) * 0.0540540541; blurResult += getColor(vec2(vTexCoord + 4.0 * blurAmount * uDirection)) * 0.0162162162; out_FragColor = blurResult; } 15:42:40 [WARNING] Loading shader_border fragment shader failed 0(2) : warning C7568: #version 400 not fully supported on current GPU target profile 0(11) : error C1115: unable to find compatible overloaded function "textureQueryLod(sampler2D, vec2)" in App::Shader::Load:240 15:42:40 Fragment code: #version 400 #extension GL_ARB_explicit_attrib_location : enable uniform vec4[1] _uUvRect; uniform int[1] _uTexRepeat; layout(location = 0) out vec4 out_FragColor; vec4 _sampleUvRect(sampler2D s, vec4 uvRect, bool repeat, vec2 uv) { float lod = 0.0; vec2 uvLod = uvRect.xy + uv * uvRect.zw; uvLod.y = 1.0 - uvLod.y; lod = textureQueryLod(s, uvLod).y; if (repeat) uv = mod(uv, vec2(1.0, 1.0)); uv = uvRect.xy + uv * uvRect.zw; uv.y = 1.0 - uv.y; return textureLod(s, uv, lod); } uniform sampler2D _uBaseTexture; /// ----------------------------------- /// uniform vec2 uTexSize; uniform vec4 uColor; in vec2 vTexCoord; bool isHighlight(vec2 off) { vec2 pos = vec2(vTexCoord.x + off.x * (1.0 / uTexSize.x), vTexCoord.y + off.y * (1.0 / uTexSize.y)); return (_sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, pos).a > 0.0); } void main() { float size = 2.0; if (_sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, vTexCoord).a > 0.0) discard; else if (isHighlight(vec2(size, size)) || isHighlight(vec2(-size, size)) || isHighlight(vec2(size, -size)) || isHighlight(vec2(-size, -size))) out_FragColor = uColor; else discard; } 15:42:40 [WARNING] Loading shader_ca fragment shader failed 0(2) : warning C7568: #version 400 not fully supported on current GPU target profile 0(11) : error C1115: unable to find compatible overloaded function "textureQueryLod(sampler2D, vec2)" in App::Shader::Load:240 15:42:40 Fragment code: #version 400 #extension GL_ARB_explicit_attrib_location : enable uniform vec4[1] _uUvRect; uniform int[1] _uTexRepeat; layout(location = 0) out vec4 out_FragColor; vec4 _sampleUvRect(sampler2D s, vec4 uvRect, bool repeat, vec2 uv) { float lod = 0.0; vec2 uvLod = uvRect.xy + uv * uvRect.zw; uvLod.y = 1.0 - uvLod.y; lod = textureQueryLod(s, uvLod).y; if (repeat) uv = mod(uv, vec2(1.0, 1.0)); uv = uvRect.xy + uv * uvRect.zw; uv.y = 1.0 - uv.y; return textureLod(s, uv, lod); } uniform sampler2D _uBaseTexture; /// ----------------------------------- /// in vec2 vTexCoord; uniform float uBlurAmount; uniform vec3 uColorOffset; uniform int uDistortChannels; vec2 distort(vec2 coord, float amount) { float d = dot(coord, coord); float distortion = amount * -0.25; coord *= 1.0 + distortion * d + distortion * d * d; return coord; } vec3 getColor(vec2 coord, vec3 offset) { int quality = 32; vec3 color = vec3(0.0); vec3 offsetStart = offset; for (int i = 0; i < quality; i++) { vec2 uv = (coord - 0.5) * 2.0; // Distort or scale RGB channels? vec2 uvRed, uvGreen, uvBlue; if (uDistortChannels > 0) { uvRed = distort(uv, offset.x); uvGreen = distort(uv, offset.y); uvBlue = distort(uv, offset.z); } else { uvRed = uv * (1.0 - offset.x * .25); uvGreen = uv * (1.0 - offset.y * .25); uvBlue = uv * (1.0 - offset.z * .25); } // Transform UV to 0 -> 1 uvRed = (uvRed * 0.5) + 0.5; uvGreen = (uvGreen * 0.5) + 0.5; uvBlue = (uvBlue * 0.5) + 0.5; color.r += _sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, uvRed).r; color.g += _sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, uvGreen).g; color.b += _sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, uvBlue).b; offset = mix(offsetStart, offsetStart + uBlurAmount, float(i) / float(quality)); } return color / float(quality); } void main() { vec3 color = getColor(vTexCoord, uColorOffset); float alpha = _sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, vTexCoord).a; out_FragColor = vec4(color, alpha); } 15:42:40 [WARNING] Loading shader_color_camera fragment shader failed 0(2) : warning C7568: #version 400 not fully supported on current GPU target profile 0(11) : error C1115: unable to find compatible overloaded function "textureQueryLod(sampler2D, vec2)" in App::Shader::Load:240 15:42:40 Fragment code: #version 400 #extension GL_ARB_explicit_attrib_location : enable uniform vec4[1] _uUvRect; uniform int[1] _uTexRepeat; layout(location = 0) out vec4 out_FragColor; vec4 _sampleUvRect(sampler2D s, vec4 uvRect, bool repeat, vec2 uv) { float lod = 0.0; vec2 uvLod = uvRect.xy + uv * uvRect.zw; uvLod.y = 1.0 - uvLod.y; lod = textureQueryLod(s, uvLod).y; if (repeat) uv = mod(uv, vec2(1.0, 1.0)); uv = uvRect.xy + uv * uvRect.zw; uv.y = 1.0 - uv.y; return textureLod(s, uv, lod); } uniform sampler2D _uBaseTexture; /// ----------------------------------- /// uniform float uBrightness; uniform vec4 uBlendColor; uniform vec4 uRGBAdd; uniform vec4 uRGBSub; uniform vec4 uHSBAdd; uniform vec4 uHSBSub; uniform vec4 uHSBMul; uniform vec4 uMixColor; in vec4 vColor; in vec2 vTexCoord; vec4 rgbtohsb(vec4 c) { vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g)); vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r)); float d = q.x - min(q.w, q.y); float e = 1.0e-10; return vec4(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x, c.a); } vec4 hsbtorgb(vec4 c) { vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); return vec4(c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y), c.a); } void main() { vec4 baseColor = vec4(uBlendColor.rgb, 1.0) * vColor * _sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, vTexCoord); // Get base out_FragColor = clamp(baseColor + uRGBAdd - uRGBSub, 0.0, 1.0); // Transform RGB out_FragColor = hsbtorgb(clamp(rgbtohsb(out_FragColor) + uHSBAdd - uHSBSub, 0.0, 1.0) * uHSBMul); // Transform HSB out_FragColor = mix(out_FragColor, vec4(uMixColor.rgb, 1.0), uMixColor.a); // Mix out_FragColor = mix(out_FragColor, vec4(1.0), uBrightness); // Brightness out_FragColor = mix(out_FragColor, vec4(0.0, 0.0, 0.0, 1.0), 1.0 - uBlendColor.a); // Alpha } 15:42:40 [WARNING] Loading shader_color_correction fragment shader failed 0(2) : warning C7568: #version 400 not fully supported on current GPU target profile 0(11) : error C1115: unable to find compatible overloaded function "textureQueryLod(sampler2D, vec2)" in App::Shader::Load:240 15:42:40 Fragment code: #version 400 #extension GL_ARB_explicit_attrib_location : enable uniform vec4[1] _uUvRect; uniform int[1] _uTexRepeat; layout(location = 0) out vec4 out_FragColor; vec4 _sampleUvRect(sampler2D s, vec4 uvRect, bool repeat, vec2 uv) { float lod = 0.0; vec2 uvLod = uvRect.xy + uv * uvRect.zw; uvLod.y = 1.0 - uvLod.y; lod = textureQueryLod(s, uvLod).y; if (repeat) uv = mod(uv, vec2(1.0, 1.0)); uv = uvRect.xy + uv * uvRect.zw; uv.y = 1.0 - uv.y; return textureLod(s, uv, lod); } uniform sampler2D _uBaseTexture; /// ----------------------------------- /// in vec2 vTexCoord; uniform float uContrast; uniform float uBrightness; uniform float uSaturation; uniform float uVibrance; uniform vec4 uColorBurn; vec4 rgbtohsb(vec4 c) { vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g)); vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r)); float d = q.x - min(q.w, q.y); float e = 1.0e-10; return vec4(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x, c.a); } void main() { // Get base vec4 baseColor = _sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, vTexCoord); // Brightness and contrast baseColor.rgb = (baseColor.rgb - vec3(0.5)) * vec3(uContrast) + vec3(uBrightness + 0.5); baseColor.rgb = clamp(baseColor.rgb, vec3(0.0), vec3(1.0)); // Saturation vec3 W = vec3(0.2125, 0.7154, 0.0721); vec3 satIntensity = vec3(dot(baseColor.rgb, W)); baseColor.rgb = mix(satIntensity, baseColor.rgb, uSaturation); baseColor.rgb = clamp(baseColor.rgb, vec3(0.0), vec3(1.0)); // Vibrance(Saturates desaturated colors) satIntensity = vec3(dot(baseColor.rgb, W)); float sat = rgbtohsb(baseColor).g; float vibrance = 1.0 - pow(pow(sat, 8.0), .15); baseColor.rgb = mix(satIntensity, baseColor.rgb, 1.0 + (vibrance * uVibrance)); baseColor.rgb = clamp(baseColor.rgb, vec3(0.0), vec3(1.0)); // Color burn baseColor.rgb = 1.0 - (1.0 - baseColor.rgb) / uColorBurn.rgb; out_FragColor = baseColor; } 15:42:40 [WARNING] Loading shader_color_fog fragment shader failed 0(2) : warning C7568: #version 400 not fully supported on current GPU target profile 0(11) : error C1115: unable to find compatible overloaded function "textureQueryLod(sampler2D, vec2)" in App::Shader::Load:240 15:42:40 Fragment code: #version 400 #extension GL_ARB_explicit_attrib_location : enable uniform vec4[1] _uUvRect; uniform int[1] _uTexRepeat; layout(location = 0) out vec4 out_FragColor; vec4 _sampleUvRect(sampler2D s, vec4 uvRect, bool repeat, vec2 uv) { float lod = 0.0; vec2 uvLod = uvRect.xy + uv * uvRect.zw; uvLod.y = 1.0 - uvLod.y; lod = textureQueryLod(s, uvLod).y; if (repeat) uv = mod(uv, vec2(1.0, 1.0)); uv = uvRect.xy + uv * uvRect.zw; uv.y = 1.0 - uv.y; return textureLod(s, uv, lod); } /// ----------------------------------- /// uniform sampler2D uTexture; // static uniform vec2 uTexScale; uniform int uColorsExt; uniform vec4 uRGBAdd; uniform vec4 uRGBSub; uniform vec4 uHSBAdd; uniform vec4 uHSBSub; uniform vec4 uHSBMul; uniform vec4 uMixColor; uniform int uFogShow; uniform vec4 uFogColor; // static uniform float uFogDistance; // static uniform float uFogSize; // static uniform float uFogHeight; // static uniform vec3 uCameraPosition; // static in vec3 vPosition; in float vDepth; in vec4 vColor; in vec2 vTexCoord; vec4 rgbtohsb(vec4 c) { vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g)); vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r)); float d = q.x - min(q.w, q.y); float e = 1.0e-10; return vec4(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x, c.a); } vec4 hsbtorgb(vec4 c) { vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); return vec4(c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y), c.a); } float getFog() { float fog; if (uFogShow > 0) { float fogDepth = distance(vPosition, uCameraPosition); fog = clamp(1.0 - (uFogDistance - fogDepth) / uFogSize, 0.0, 1.0); fog *= clamp(1.0 - (vPosition.z - uFogHeight) / uFogSize, 0.0, 1.0); } else fog = 0.0; return fog; } void main() { vec2 tex = vTexCoord; if (uTexScale.x < 1.0 || uTexScale.y < 1.0) tex = mod(tex * uTexScale, uTexScale); // GM sprite bug workaround vec4 baseColor = vColor * _sampleUvRect(uTexture, _uUvRect[0], _uTexRepeat[0] > 0, tex); // Get base if (uColorsExt > 0) { out_FragColor = clamp(baseColor + uRGBAdd - uRGBSub, 0.0, 1.0); // Transform RGB out_FragColor = hsbtorgb(clamp(rgbtohsb(out_FragColor) + uHSBAdd - uHSBSub, 0.0, 1.0) * uHSBMul); // Transform HSB out_FragColor = mix(out_FragColor, uMixColor, uMixColor.a); // Mix out_FragColor = mix(out_FragColor, uFogColor, getFog()); // Mix fog out_FragColor.a = baseColor.a; // Correct alpha } else { out_FragColor = mix(baseColor, uFogColor, getFog()); // Mix fog out_FragColor.a = baseColor.a; // Correct alpha } if (out_FragColor.a == 0.0) discard; } 15:42:40 [WARNING] Loading shader_color_fog_lights fragment shader failed 0(2) : warning C7568: #version 400 not fully supported on current GPU target profile 0(11) : error C1115: unable to find compatible overloaded function "textureQueryLod(sampler2D, vec2)" in App::Shader::Load:240 15:42:40 Fragment code: #version 400 #extension GL_ARB_explicit_attrib_location : enable uniform vec4[1] _uUvRect; uniform int[1] _uTexRepeat; layout(location = 0) out vec4 out_FragColor; vec4 _sampleUvRect(sampler2D s, vec4 uvRect, bool repeat, vec2 uv) { float lod = 0.0; vec2 uvLod = uvRect.xy + uv * uvRect.zw; uvLod.y = 1.0 - uvLod.y; lod = textureQueryLod(s, uvLod).y; if (repeat) uv = mod(uv, vec2(1.0, 1.0)); uv = uvRect.xy + uv * uvRect.zw; uv.y = 1.0 - uv.y; return textureLod(s, uv, lod); } /// ----------------------------------- /// uniform sampler2D uTexture; // static uniform vec2 uTexScale; uniform int uColorsExt; uniform vec4 uRGBAdd; uniform vec4 uRGBSub; uniform vec4 uHSBAdd; uniform vec4 uHSBSub; uniform vec4 uHSBMul; uniform vec4 uMixColor; uniform int uFogShow; uniform vec4 uFogColor; // static uniform float uFogDistance; // static uniform float uFogSize; // static uniform float uFogHeight; // static uniform vec3 uCameraPosition; // static in vec3 vPosition; in float vDepth; in vec4 vColor; in vec2 vTexCoord; in vec3 vDiffuse; vec4 rgbtohsb(vec4 c) { vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g)); vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r)); float d = q.x - min(q.w, q.y); float e = 1.0e-10; return vec4(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x, c.a); } vec4 hsbtorgb(vec4 c) { vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); return vec4(c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y), c.a); } float getFog() { float fog; if (uFogShow > 0) { float fogDepth = distance(vPosition, uCameraPosition); fog = clamp(1.0 - (uFogDistance - fogDepth) / uFogSize, 0.0, 1.0); fog *= clamp(1.0 - (vPosition.z - uFogHeight) / uFogSize, 0.0, 1.0); } else fog = 0.0; return fog; } void main() { vec2 tex = vTexCoord; if (uTexScale.x < 1.0 || uTexScale.y < 1.0) tex = mod(tex * uTexScale, uTexScale); // GM sprite bug workaround vec4 baseColor = vColor * _sampleUvRect(uTexture, _uUvRect[0], _uTexRepeat[0] > 0, tex); // Get base if (uColorsExt > 0) { out_FragColor = clamp(baseColor + uRGBAdd - uRGBSub, 0.0, 1.0); // Transform RGB out_FragColor = hsbtorgb(clamp(rgbtohsb(out_FragColor) + uHSBAdd - uHSBSub, 0.0, 1.0) * uHSBMul); // Transform HSB out_FragColor = mix(out_FragColor, uMixColor, uMixColor.a); // Mix out_FragColor *= vec4(vDiffuse, 1.0); // Multiply diffuse out_FragColor = mix(out_FragColor, uFogColor, getFog()); // Mix fog out_FragColor.a = baseColor.a; // Correct alpha } else { out_FragColor = baseColor * vec4(vDiffuse, 1.0); // Multiply diffuse out_FragColor = mix(out_FragColor, uFogColor, getFog()); // Mix fog out_FragColor.a = baseColor.a; // Correct alpha } if (out_FragColor.a == 0.0) discard; } 15:42:40 [WARNING] Loading shader_color_glow fragment shader failed 0(2) : warning C7568: #version 400 not fully supported on current GPU target profile 0(11) : error C1115: unable to find compatible overloaded function "textureQueryLod(sampler2D, vec2)" in App::Shader::Load:240 15:42:40 Fragment code: #version 400 #extension GL_ARB_explicit_attrib_location : enable uniform vec4[1] _uUvRect; uniform int[1] _uTexRepeat; layout(location = 0) out vec4 out_FragColor; vec4 _sampleUvRect(sampler2D s, vec4 uvRect, bool repeat, vec2 uv) { float lod = 0.0; vec2 uvLod = uvRect.xy + uv * uvRect.zw; uvLod.y = 1.0 - uvLod.y; lod = textureQueryLod(s, uvLod).y; if (repeat) uv = mod(uv, vec2(1.0, 1.0)); uv = uvRect.xy + uv * uvRect.zw; uv.y = 1.0 - uv.y; return textureLod(s, uv, lod); } /// ----------------------------------- /// uniform sampler2D uTexture; // static uniform vec2 uTexScale; uniform int uColorsExt; uniform vec4 uRGBAdd; uniform vec4 uRGBSub; uniform vec4 uHSBAdd; uniform vec4 uHSBSub; uniform vec4 uHSBMul; uniform vec4 uMixColor; uniform int uGlow; uniform int uGlowTexture; uniform vec4 uGlowColor; uniform int uBlockGlow; uniform int uFogShow; uniform float uFogDistance; // static uniform float uFogSize; // static uniform float uFogHeight; // static uniform vec3 uCameraPosition; // static uniform float uGlowThreshold; // static in vec3 vPosition; in float vDepth; in vec4 vColor; in vec2 vTexCoord; in float vBrightness; vec4 rgbtohsb(vec4 c) { vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g)); vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r)); float d = q.x - min(q.w, q.y); float e = 1.0e-10; return vec4(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x, c.a); } vec4 hsbtorgb(vec4 c) { vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); return vec4(c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y), c.a); } float getFog() { float fog; if (uFogShow > 0) { float fogDepth = distance(vPosition, uCameraPosition); fog = clamp(1.0 - (uFogDistance - fogDepth) / uFogSize, 0.0, 1.0); fog *= clamp(1.0 - (vPosition.z - uFogHeight) / uFogSize, 0.0, 1.0); } else fog = 0.0; return fog; } void main() { vec2 tex = vTexCoord; if (uTexScale.x < 1.0 || uTexScale.y < 1.0) tex = mod(tex * uTexScale, uTexScale); // GM sprite bug workaround vec4 baseColor = vColor * _sampleUvRect(uTexture, _uUvRect[0], _uTexRepeat[0] > 0, tex); // Get base // Glow isn't enabled on object, but bright blocks should still glow if (uGlow < 1 && uBlockGlow > 0) { if (((baseColor.r + baseColor.g + baseColor.b) / 3.0) > uGlowThreshold) baseColor.rgb *= vec3(vBrightness); else baseColor.rgb *= vec3(0.0); } else { // Glow using base texture and color settings if (uGlowTexture > 0) { if (uColorsExt > 0) { float baseAlpha = baseColor.a; baseColor = clamp(baseColor + uRGBAdd - uRGBSub, 0.0, 1.0); // Transform RGB baseColor = hsbtorgb(clamp(rgbtohsb(baseColor) + uHSBAdd - uHSBSub, 0.0, 1.0) * uHSBMul); // Transform HSB baseColor = mix(baseColor, uMixColor, uMixColor.a); // Mix baseColor.a = baseAlpha; // Correct alpha } baseColor.rgb *= uGlowColor.rgb; } else { baseColor.rgb = uGlowColor.rgb; } } baseColor.rgb *= vec3(1.0 - getFog()); out_FragColor = baseColor; if ((out_FragColor.a <= 0.98 && uGlow < 1) || out_FragColor.a == 0.0) discard; } 15:42:40 [WARNING] Loading shader_depth fragment shader failed 0(2) : warning C7568: #version 400 not fully supported on current GPU target profile 0(11) : error C1115: unable to find compatible overloaded function "textureQueryLod(sampler2D, vec2)" in App::Shader::Load:240 15:42:40 Fragment code: #version 400 #extension GL_ARB_explicit_attrib_location : enable uniform vec4[1] _uUvRect; uniform int[1] _uTexRepeat; layout(location = 0) out vec4 out_FragColor; vec4 _sampleUvRect(sampler2D s, vec4 uvRect, bool repeat, vec2 uv) { float lod = 0.0; vec2 uvLod = uvRect.xy + uv * uvRect.zw; uvLod.y = 1.0 - uvLod.y; lod = textureQueryLod(s, uvLod).y; if (repeat) uv = mod(uv, vec2(1.0, 1.0)); uv = uvRect.xy + uv * uvRect.zw; uv.y = 1.0 - uv.y; return textureLod(s, uv, lod); } /// ----------------------------------- /// uniform sampler2D uTexture; // static uniform vec2 uTexScale; in vec2 vTexCoord; in float vDepth; vec4 packDepth(float f) { return vec4(floor(f * 255.0) / 255.0, fract(f * 255.0), fract(f * 255.0 * 255.0), 1.0); } void main() { out_FragColor = packDepth(vDepth); vec2 tex = vTexCoord; if (uTexScale.x < 1.0 || uTexScale.y < 1.0) tex = mod(tex * uTexScale, uTexScale); // GM sprite bug workaround if (_sampleUvRect(uTexture, _uUvRect[0], _uTexRepeat[0] > 0, tex).a < 0.1) discard; } 15:42:40 [WARNING] Loading shader_depth_point fragment shader failed 0(2) : warning C7568: #version 400 not fully supported on current GPU target profile 0(11) : error C1115: unable to find compatible overloaded function "textureQueryLod(sampler2D, vec2)" in App::Shader::Load:240 15:42:40 Fragment code: #version 400 #extension GL_ARB_explicit_attrib_location : enable uniform vec4[1] _uUvRect; uniform int[1] _uTexRepeat; layout(location = 0) out vec4 out_FragColor; vec4 _sampleUvRect(sampler2D s, vec4 uvRect, bool repeat, vec2 uv) { float lod = 0.0; vec2 uvLod = uvRect.xy + uv * uvRect.zw; uvLod.y = 1.0 - uvLod.y; lod = textureQueryLod(s, uvLod).y; if (repeat) uv = mod(uv, vec2(1.0, 1.0)); uv = uvRect.xy + uv * uvRect.zw; uv.y = 1.0 - uv.y; return textureLod(s, uv, lod); } /// ----------------------------------- /// uniform sampler2D uTexture; // static uniform vec2 uTexScale; uniform vec3 uEye; // static uniform float uNear; // static uniform float uFar; // static in vec3 vPosition; in vec2 vTexCoord; vec4 packDepth(float f) { return vec4(floor(f * 255.0) / 255.0, fract(f * 255.0), fract(f * 255.0 * 255.0), 1.0); } void main() { vec2 tex = vTexCoord; if (uTexScale.x < 1.0 || uTexScale.y < 1.0) tex = mod(tex * uTexScale, uTexScale); // GM sprite bug workaround if (_sampleUvRect(uTexture, _uUvRect[0], _uTexRepeat[0] > 0, tex).a == 0.0) discard; out_FragColor = packDepth((distance(vPosition, uEye) - uNear) / (uFar - uNear)); } 15:42:40 [WARNING] Loading shader_distort fragment shader failed 0(2) : warning C7568: #version 400 not fully supported on current GPU target profile 0(11) : error C1115: unable to find compatible overloaded function "textureQueryLod(sampler2D, vec2)" in App::Shader::Load:240 15:42:40 Fragment code: #version 400 #extension GL_ARB_explicit_attrib_location : enable uniform vec4[1] _uUvRect; uniform int[1] _uTexRepeat; layout(location = 0) out vec4 out_FragColor; vec4 _sampleUvRect(sampler2D s, vec4 uvRect, bool repeat, vec2 uv) { float lod = 0.0; vec2 uvLod = uvRect.xy + uv * uvRect.zw; uvLod.y = 1.0 - uvLod.y; lod = textureQueryLod(s, uvLod).y; if (repeat) uv = mod(uv, vec2(1.0, 1.0)); uv = uvRect.xy + uv * uvRect.zw; uv.y = 1.0 - uv.y; return textureLod(s, uv, lod); } uniform sampler2D _uBaseTexture; /// ----------------------------------- /// in vec2 vTexCoord; uniform float uDistortAmount; uniform int uRepeatImage; vec2 distort(vec2 coord, float amount) { float d = dot(coord, coord); float distortion = amount * -0.25; coord *= 1.0 + distortion * d + distortion * d * d; return coord; } void main() { // Transform UV to -1 -> 1 vec2 uv = (vTexCoord - 0.5) * 2.0; uv = distort(uv, uDistortAmount); uv = (uv * 0.5) + 0.5; vec4 color = _sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, uv); if (uRepeatImage < 1) { if (uv.x < 0.0 || uv.x > 1.0 || uv.y < 0.0 || uv.y > 1.0) color = vec4(0.0); } out_FragColor = vec4(color); } 15:42:40 [WARNING] Loading shader_draw_texture fragment shader failed 0(2) : warning C7568: #version 400 not fully supported on current GPU target profile 0(11) : error C1115: unable to find compatible overloaded function "textureQueryLod(sampler2D, vec2)" in App::Shader::Load:240 15:42:40 Fragment code: #version 400 #extension GL_ARB_explicit_attrib_location : enable uniform vec4[1] _uUvRect; uniform int[1] _uTexRepeat; layout(location = 0) out vec4 out_FragColor; vec4 _sampleUvRect(sampler2D s, vec4 uvRect, bool repeat, vec2 uv) { float lod = 0.0; vec2 uvLod = uvRect.xy + uv * uvRect.zw; uvLod.y = 1.0 - uvLod.y; lod = textureQueryLod(s, uvLod).y; if (repeat) uv = mod(uv, vec2(1.0, 1.0)); uv = uvRect.xy + uv * uvRect.zw; uv.y = 1.0 - uv.y; return textureLod(s, uv, lod); } /// ----------------------------------- /// uniform sampler2D uTexture; uniform vec2 uTexScale; uniform int uMask; in vec2 vTexCoord; in vec4 vColor; void main() { vec2 tex = vTexCoord; if (uTexScale.x < 1.0 || uTexScale.y < 1.0) tex = mod(tex * uTexScale, uTexScale); // GM sprite bug workaround vec4 color; color = _sampleUvRect(uTexture, _uUvRect[0], _uTexRepeat[0] > 0, tex); if (uMask > 0) { color.a = color.r; color.rgb = vColor.rgb; } else color *= vColor; out_FragColor = color; } 15:42:40 [WARNING] Loading shader_high_aa fragment shader failed 0(2) : warning C7568: #version 400 not fully supported on current GPU target profile 0(11) : error C1115: unable to find compatible overloaded function "textureQueryLod(sampler2D, vec2)" in App::Shader::Load:240 15:42:40 Fragment code: #version 400 #extension GL_ARB_explicit_attrib_location : enable uniform vec4[1] _uUvRect; uniform int[1] _uTexRepeat; layout(location = 0) out vec4 out_FragColor; vec4 _sampleUvRect(sampler2D s, vec4 uvRect, bool repeat, vec2 uv) { float lod = 0.0; vec2 uvLod = uvRect.xy + uv * uvRect.zw; uvLod.y = 1.0 - uvLod.y; lod = textureQueryLod(s, uvLod).y; if (repeat) uv = mod(uv, vec2(1.0, 1.0)); uv = uvRect.xy + uv * uvRect.zw; uv.y = 1.0 - uv.y; return textureLod(s, uv, lod); } uniform sampler2D _uBaseTexture; /// ----------------------------------- /// uniform vec2 uScreenSize; uniform float uPower; in vec2 vTexCoord; void main() { vec2 texelSize = 1.0 / uScreenSize; float reducemul = 1.0 / 8.0; float reducemin = 1.0 / 128.0; float def = 4.0; vec4 basecol = _sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, vTexCoord); vec4 baseNW = _sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, vTexCoord - texelSize); vec4 baseNE = _sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, vTexCoord + vec2(texelSize.x, -texelSize.y)); vec4 baseSW = _sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, vTexCoord + vec2(-texelSize.x, texelSize.y)); vec4 baseSE = _sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, vTexCoord + texelSize); vec4 gray = vec4(0.299, 0.587, 0.114, 1.0); float monocol = dot(basecol, gray); float monoNW = dot(baseNW, gray); float monoNE = dot(baseNE, gray); float monoSW = dot(baseSW, gray); float monoSE = dot(baseSE, gray); float monomin = min(monocol, min(min(monoNW, monoNE), min(monoSW, monoSE))); float monomax = max(monocol, max(max(monoNW, monoNE), max(monoSW, monoSE))); vec2 dir = vec2(-((monoNW + monoNE) - (monoSW + monoSE)), ((monoNW + monoSW) - (monoNE + monoSE))); float dirreduce = max((monoNW + monoNE + monoSW + monoSE) * reducemul * 0.25, reducemin); float dirmin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirreduce); dir = min(vec2(uPower * def), max(vec2(-uPower * def), dir * dirmin)) * texelSize; vec4 resultA = 0.5 * (_sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, vTexCoord + dir * -0.166667) + _sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, vTexCoord + dir * 0.166667)); vec4 resultB = resultA * 0.5 + 0.25 * (_sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, vTexCoord + dir * -0.5) + _sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, vTexCoord + dir * 0.5)); float monoB = dot(resultB, gray); if (monoB < monomin || monoB > monomax) out_FragColor = resultA; else out_FragColor = resultB; } 15:42:40 [WARNING] Loading shader_high_bloom_threshold fragment shader failed 0(2) : warning C7568: #version 400 not fully supported on current GPU target profile 0(11) : error C1115: unable to find compatible overloaded function "textureQueryLod(sampler2D, vec2)" in App::Shader::Load:240 15:42:40 Fragment code: #version 400 #extension GL_ARB_explicit_attrib_location : enable uniform vec4[1] _uUvRect; uniform int[1] _uTexRepeat; layout(location = 0) out vec4 out_FragColor; vec4 _sampleUvRect(sampler2D s, vec4 uvRect, bool repeat, vec2 uv) { float lod = 0.0; vec2 uvLod = uvRect.xy + uv * uvRect.zw; uvLod.y = 1.0 - uvLod.y; lod = textureQueryLod(s, uvLod).y; if (repeat) uv = mod(uv, vec2(1.0, 1.0)); uv = uvRect.xy + uv * uvRect.zw; uv.y = 1.0 - uv.y; return textureLod(s, uv, lod); } uniform sampler2D _uBaseTexture; /// ----------------------------------- /// uniform float uThreshold; in vec2 vTexCoord; void main() { vec4 baseColor = _sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, vTexCoord); if (max(max(baseColor.r, baseColor.g), baseColor.b) > uThreshold) out_FragColor = baseColor; else out_FragColor = vec4(vec3(0.0), 1.0); } 15:42:40 [WARNING] Loading shader_high_dof fragment shader failed 0(2) : warning C7568: #version 400 not fully supported on current GPU target profile 0(11) : error C1115: unable to find compatible overloaded function "textureQueryLod(sampler2D, vec2)" in App::Shader::Load:240 15:42:40 Fragment code: #version 400 #extension GL_ARB_explicit_attrib_location : enable uniform vec4[2] _uUvRect; uniform int[2] _uTexRepeat; layout(location = 0) out vec4 out_FragColor; vec4 _sampleUvRect(sampler2D s, vec4 uvRect, bool repeat, vec2 uv) { float lod = 0.0; vec2 uvLod = uvRect.xy + uv * uvRect.zw; uvLod.y = 1.0 - uvLod.y; lod = textureQueryLod(s, uvLod).y; if (repeat) uv = mod(uv, vec2(1.0, 1.0)); uv = uvRect.xy + uv * uvRect.zw; uv.y = 1.0 - uv.y; return textureLod(s, uv, lod); } uniform sampler2D _uBaseTexture; /// ----------------------------------- /// uniform sampler2D uBlurBuffer; uniform vec2 uScreenSize; uniform float uBlurSize; uniform float uBias; uniform float uThreshold; uniform float uGain; uniform int uFringe; uniform vec3 uFringeAngle; uniform vec3 uFringeStrength; uniform int uSampleAmount; uniform vec2 uSamples[256]; uniform float uWeightSamples[256]; in vec2 vTexCoord; float getBlur(vec2 coord) { vec2 blur = _sampleUvRect(uBlurBuffer, _uUvRect[1], _uTexRepeat[1] > 0, coord).xy; return clamp(blur.x + blur.y, 0.0, 1.0); } vec4 getFringe(vec2 coord, float blur, vec4 color) { vec2 texelSize = 1.0 / uScreenSize; float screenSampleSize = uScreenSize.y * uBlurSize; vec4 baseColor = color; if (uFringe < 1) return baseColor; float fringeSize = texelSize.x * blur * screenSampleSize; vec2 redOffset = vec2(cos(uFringeAngle.x), sin(uFringeAngle.x)) * (uFringeStrength.x * fringeSize); float redBlur = getBlur(coord + redOffset); baseColor.r = _sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, coord + redOffset * redBlur).r; vec2 greenOffset = vec2(cos(uFringeAngle.y), sin(uFringeAngle.y)) * (uFringeStrength.y * fringeSize); float greenBlur = getBlur(coord + greenOffset); baseColor.g = _sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, coord + greenOffset * greenBlur).g; vec2 blueOffset = vec2(cos(uFringeAngle.z), sin(uFringeAngle.z)) * (uFringeStrength.z * fringeSize); float blueBlur = getBlur(coord + blueOffset); baseColor.b = _sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, coord + blueOffset * blueBlur).b; return baseColor; } vec4 getColor(vec2 coord, float blur) { vec4 baseColor = _sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, coord); baseColor = getFringe(coord, blur, baseColor); // Boost brightness using threshold and gain strengthen Bokeh highlights vec3 lumCo = vec3(0.299,0.587,0.114); float lum = dot(baseColor.rgb, lumCo); float thresh = max((lum - uThreshold) * uGain, 0.0); baseColor.rgb = baseColor.rgb + mix(vec3(0.0), baseColor.rgb, vec3(thresh * blur)); return baseColor; } void main() { vec2 texelSize = 1.0 / uScreenSize; float screenSampleSize = uScreenSize.y * uBlurSize; vec2 blurTex = _sampleUvRect(uBlurBuffer, _uUvRect[1], _uTexRepeat[1] > 0, vTexCoord).xy; float myBlur = clamp(blurTex.r + blurTex.g, 0.0, 1.0); float blur = 0.0; float colorDiv = 0.0; vec4 colorAdd = vec4(0.0); float weightStrength = 0.0; float blurAmount = myBlur * screenSampleSize; out_FragColor = vec4(0.0); // Don't go through samples if there's no blur needed if (blurAmount > 0.0) { // Sample positions for (int i = 0; i < 256; i++) { if (i > uSampleAmount) break; if (uWeightSamples[i] < 0.05) continue; vec2 offset = uSamples[i].xy * blurAmount; vec2 tex = vTexCoord + texelSize * offset; float sampleBlur = getBlur(tex); float bias = mix(1.0, smoothstep(0.0, 1.0, uWeightSamples[i]), uBias); float mul = (1.0 - (1.0 - sampleBlur) * myBlur) * bias; blur += sampleBlur; if (mul > 0.0) { colorAdd += getColor(tex, sampleBlur) * mul; colorDiv += mul; } weightStrength += bias; } blur /= weightStrength; blur += myBlur; colorAdd *= blur; colorDiv *= blur; out_FragColor += colorAdd; out_FragColor /= colorDiv; } else out_FragColor = _sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, vTexCoord); } 15:42:40 [WARNING] Loading shader_high_dof_coc fragment shader failed 0(2) : warning C7568: #version 400 not fully supported on current GPU target profile 0(11) : error C1115: unable to find compatible overloaded function "textureQueryLod(sampler2D, vec2)" in App::Shader::Load:240 15:42:40 Fragment code: #version 400 #extension GL_ARB_explicit_attrib_location : enable uniform vec4[1] _uUvRect; uniform int[1] _uTexRepeat; layout(location = 0) out vec4 out_FragColor; vec4 _sampleUvRect(sampler2D s, vec4 uvRect, bool repeat, vec2 uv) { float lod = 0.0; vec2 uvLod = uvRect.xy + uv * uvRect.zw; uvLod.y = 1.0 - uvLod.y; lod = textureQueryLod(s, uvLod).y; if (repeat) uv = mod(uv, vec2(1.0, 1.0)); uv = uvRect.xy + uv * uvRect.zw; uv.y = 1.0 - uv.y; return textureLod(s, uv, lod); } /// ----------------------------------- /// uniform sampler2D uDepthBuffer; uniform float uDepth; uniform float uRange; uniform float uFadeSize; uniform float uNear; uniform float uFar; in vec2 vTexCoord; float unpackDepth(vec4 c) { return c.r + c.g / 255.0 + c.b / (255.0 * 255.0); } float getDepth(vec2 coord) { return uNear + unpackDepth(_sampleUvRect(uDepthBuffer, _uUvRect[0], _uTexRepeat[0] > 0, coord)) * (uFar - uNear); } float getFrontBlur(float d) { return clamp(((uDepth - uRange) - d) / uFadeSize, 0.0, 1.0); } float getBackBlur(float d) { return clamp((d - (uDepth + uRange)) / uFadeSize, 0.0, 1.0); } void main() { float depth = getDepth(vTexCoord); float frontBlur = getFrontBlur(depth); float backBlur = getBackBlur(depth); out_FragColor = vec4(frontBlur, backBlur, 0.0, 1.0); } 15:42:40 [WARNING] Loading shader_high_dof_coc_blur fragment shader failed 0(2) : warning C7568: #version 400 not fully supported on current GPU target profile 0(12) : error C1115: unable to find compatible overloaded function "textureQueryLod(sampler2D, vec2)" in App::Shader::Load:240 15:42:40 Fragment code: #version 400 #extension GL_ARB_explicit_attrib_location : enable uniform vec4[1] _uUvRect; uniform int[1] _uTexRepeat; #define SAMPLES 4 layout(location = 0) out vec4 out_FragColor; vec4 _sampleUvRect(sampler2D s, vec4 uvRect, bool repeat, vec2 uv) { float lod = 0.0; vec2 uvLod = uvRect.xy + uv * uvRect.zw; uvLod.y = 1.0 - uvLod.y; lod = textureQueryLod(s, uvLod).y; if (repeat) uv = mod(uv, vec2(1.0, 1.0)); uv = uvRect.xy + uv * uvRect.zw; uv.y = 1.0 - uv.y; return textureLod(s, uv, lod); } uniform sampler2D _uBaseTexture; /// ----------------------------------- /// uniform vec2 uScreenSize; uniform vec2 uPixelCheck; in vec2 vTexCoord; void main() { // Turn the pixel into a texel vec2 texelCheck = (uPixelCheck / uScreenSize) * 2.0; // Set up weights float weights[SAMPLES + 1]; weights[0] = 70.0; weights[1] = 56.0; weights[2] = 28.0; weights[3] = 8.0; weights[4] = 1.0; // Back blur(R) can't bleed into focus, while the front blur(G) can float myFrontBlur = _sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, vTexCoord).r; float myBackBlur = _sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, vTexCoord).g; float frontBlur = myFrontBlur * weights[0]; float totalFrontWeight = weights[0]; // Sample surrounding pixels for (int i = 0; i < SAMPLES; i += 1) { // Get the sample uv coordinates vec2 sampleOffset = float(i + 1) * texelCheck; // Positive direction vec2 sampleCoords = vTexCoord + sampleOffset; float weight = weights[i + 1]; frontBlur += _sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, sampleCoords).r * weight; totalFrontWeight += weight; // Negative direction sampleCoords = vTexCoord - sampleOffset; frontBlur += _sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, sampleCoords).r * weight; totalFrontWeight += weight; } out_FragColor = vec4(max(frontBlur / totalFrontWeight, myFrontBlur), myBackBlur, 0.0, 1.0); } 15:42:40 [WARNING] Loading shader_high_fog fragment shader failed 0(2) : warning C7568: #version 400 not fully supported on current GPU target profile 0(11) : error C1115: unable to find compatible overloaded function "textureQueryLod(sampler2D, vec2)" in App::Shader::Load:240 15:42:40 Fragment code: #version 400 #extension GL_ARB_explicit_attrib_location : enable uniform vec4[1] _uUvRect; uniform int[1] _uTexRepeat; layout(location = 0) out vec4 out_FragColor; vec4 _sampleUvRect(sampler2D s, vec4 uvRect, bool repeat, vec2 uv) { float lod = 0.0; vec2 uvLod = uvRect.xy + uv * uvRect.zw; uvLod.y = 1.0 - uvLod.y; lod = textureQueryLod(s, uvLod).y; if (repeat) uv = mod(uv, vec2(1.0, 1.0)); uv = uvRect.xy + uv * uvRect.zw; uv.y = 1.0 - uv.y; return textureLod(s, uv, lod); } /// ----------------------------------- /// uniform sampler2D uTexture; // static uniform vec2 uTexScale; uniform int uFogShow; uniform vec4 uFogColor; // static uniform float uFogDistance; // static uniform float uFogSize; // static uniform float uFogHeight; // static uniform vec3 uCameraPosition; // static in vec3 vPosition; in vec4 vColor; in vec2 vTexCoord; in float vDepth; float getFog() { float fog; if (uFogShow > 0) { float fogDepth = distance(vPosition, uCameraPosition); fog = clamp(1.0 - (uFogDistance - fogDepth) / uFogSize, 0.0, 1.0); fog *= clamp(1.0 - (vPosition.z - uFogHeight) / uFogSize, 0.0, 1.0); } else fog = 0.0; return fog; } void main() { vec2 tex = vTexCoord; if (uTexScale.x < 1.0 || uTexScale.y < 1.0) tex = mod(tex * uTexScale, uTexScale); // GM sprite bug workaround vec4 baseColor = vColor * _sampleUvRect(uTexture, _uUvRect[0], _uTexRepeat[0] > 0, tex); if (baseColor.a > 0.0) out_FragColor = vec4(vec3(getFog()), 1.0); else discard; } 15:42:40 [WARNING] Loading shader_high_fog_apply fragment shader failed 0(2) : warning C7568: #version 400 not fully supported on current GPU target profile 0(11) : error C1115: unable to find compatible overloaded function "textureQueryLod(sampler2D, vec2)" in App::Shader::Load:240 15:42:40 Fragment code: #version 400 #extension GL_ARB_explicit_attrib_location : enable uniform vec4[1] _uUvRect; uniform int[1] _uTexRepeat; layout(location = 0) out vec4 out_FragColor; vec4 _sampleUvRect(sampler2D s, vec4 uvRect, bool repeat, vec2 uv) { float lod = 0.0; vec2 uvLod = uvRect.xy + uv * uvRect.zw; uvLod.y = 1.0 - uvLod.y; lod = textureQueryLod(s, uvLod).y; if (repeat) uv = mod(uv, vec2(1.0, 1.0)); uv = uvRect.xy + uv * uvRect.zw; uv.y = 1.0 - uv.y; return textureLod(s, uv, lod); } /// ----------------------------------- /// uniform sampler2D uFogBuffer; uniform vec4 uFogColor; in vec2 vTexCoord; void main() { float fog = _sampleUvRect(uFogBuffer, _uUvRect[0], _uTexRepeat[0] > 0, vTexCoord).r; out_FragColor = vec4(uFogColor.rgb, fog); } 15:42:40 [WARNING] Loading shader_high_light_apply fragment shader failed 0(2) : warning C7568: #version 400 not fully supported on current GPU target profile 0(11) : error C1115: unable to find compatible overloaded function "textureQueryLod(sampler2D, vec2)" in App::Shader::Load:240 15:42:40 Fragment code: #version 400 #extension GL_ARB_explicit_attrib_location : enable uniform vec4[1] _uUvRect; uniform int[1] _uTexRepeat; layout(location = 0) out vec4 out_FragColor; vec4 _sampleUvRect(sampler2D s, vec4 uvRect, bool repeat, vec2 uv) { float lod = 0.0; vec2 uvLod = uvRect.xy + uv * uvRect.zw; uvLod.y = 1.0 - uvLod.y; lod = textureQueryLod(s, uvLod).y; if (repeat) uv = mod(uv, vec2(1.0, 1.0)); uv = uvRect.xy + uv * uvRect.zw; uv.y = 1.0 - uv.y; return textureLod(s, uv, lod); } uniform sampler2D _uBaseTexture; /// ----------------------------------- /// uniform vec4 uAmbientColor; in vec2 vTexCoord; void main() { vec4 baseColor = _sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, vTexCoord); vec4 col = 1.0 - baseColor; col *= 1.0 - uAmbientColor; out_FragColor = 1.0 - col; out_FragColor.a = baseColor.a; } 15:42:40 [WARNING] Loading shader_high_light_desaturate fragment shader failed 0(2) : warning C7568: #version 400 not fully supported on current GPU target profile 0(11) : error C1115: unable to find compatible overloaded function "textureQueryLod(sampler2D, vec2)" in App::Shader::Load:240 15:42:40 Fragment code: #version 400 #extension GL_ARB_explicit_attrib_location : enable uniform vec4[2] _uUvRect; uniform int[2] _uTexRepeat; layout(location = 0) out vec4 out_FragColor; vec4 _sampleUvRect(sampler2D s, vec4 uvRect, bool repeat, vec2 uv) { float lod = 0.0; vec2 uvLod = uvRect.xy + uv * uvRect.zw; uvLod.y = 1.0 - uvLod.y; lod = textureQueryLod(s, uvLod).y; if (repeat) uv = mod(uv, vec2(1.0, 1.0)); uv = uvRect.xy + uv * uvRect.zw; uv.y = 1.0 - uv.y; return textureLod(s, uv, lod); } uniform sampler2D _uBaseTexture; /// ----------------------------------- /// uniform sampler2D uShadowBuffer; uniform float uAmount; in vec2 vTexCoord; void main() { vec4 baseColor = _sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, vTexCoord); vec4 lightColor = _sampleUvRect(uShadowBuffer, _uUvRect[1], _uTexRepeat[1] > 0, vTexCoord); float amount = ((lightColor.r + lightColor.g + lightColor.b) / 3.0); // Exponential amount = -pow(2.0, -10.0 * amount) + 1.0; amount = min(1.0, max(0.0, amount) + uAmount); // Desaturate vec3 W = vec3(0.2125, 0.7154, 0.0721); vec3 satIntensity = vec3(dot(baseColor.rgb, W)); baseColor.rgb = mix(satIntensity, baseColor.rgb, amount); out_FragColor = baseColor; out_FragColor.a = baseColor.a; } 15:42:40 [WARNING] Loading shader_high_light_night fragment shader failed 0(2) : warning C7568: #version 400 not fully supported on current GPU target profile 0(11) : error C1115: unable to find compatible overloaded function "textureQueryLod(sampler2D, vec2)" in App::Shader::Load:240 15:42:40 Fragment code: #version 400 #extension GL_ARB_explicit_attrib_location : enable uniform vec4[1] _uUvRect; uniform int[1] _uTexRepeat; layout(location = 0) out vec4 out_FragColor; vec4 _sampleUvRect(sampler2D s, vec4 uvRect, bool repeat, vec2 uv) { float lod = 0.0; vec2 uvLod = uvRect.xy + uv * uvRect.zw; uvLod.y = 1.0 - uvLod.y; lod = textureQueryLod(s, uvLod).y; if (repeat) uv = mod(uv, vec2(1.0, 1.0)); uv = uvRect.xy + uv * uvRect.zw; uv.y = 1.0 - uv.y; return textureLod(s, uv, lod); } /// ----------------------------------- /// uniform sampler2D uTexture; // static uniform vec2 uTexScale; uniform vec4 uBlendColor; in vec2 vTexCoord; in float vBrightness; void main() { vec2 tex = vTexCoord; if (uTexScale.x < 1.0 || uTexScale.y < 1.0) tex = mod(tex * uTexScale, uTexScale); // GM sprite bug workaround vec4 baseColor = uBlendColor * _sampleUvRect(uTexture, _uUvRect[0], _uTexRepeat[0] > 0, tex); out_FragColor = vec4(vec3(vBrightness), baseColor.a); if (out_FragColor.a == 0.0) discard; } 15:42:40 [WARNING] Loading shader_high_light_point fragment shader failed 0(2) : warning C7568: #version 400 not fully supported on current GPU target profile 0(15) : error C1115: unable to find compatible overloaded function "textureQueryLod(sampler2D, vec2)" in App::Shader::Load:240 15:42:40 Fragment code: #version 400 #extension GL_ARB_explicit_attrib_location : enable uniform vec4[7] _uUvRect; uniform int[7] _uTexRepeat; #define MAXSAMPLES 64 #define TAU PI * 2.0 #define PI 3.14159265 #define SQRT05 0.707106781 layout(location = 0) out vec4 out_FragColor; vec4 _sampleUvRect(sampler2D s, vec4 uvRect, bool repeat, vec2 uv) { float lod = 0.0; vec2 uvLod = uvRect.xy + uv * uvRect.zw; uvLod.y = 1.0 - uvLod.y; lod = textureQueryLod(s, uvLod).y; if (repeat) uv = mod(uv, vec2(1.0, 1.0)); uv = uvRect.xy + uv * uvRect.zw; uv.y = 1.0 - uv.y; return textureLod(s, uv, lod); } /// ----------------------------------- /// uniform sampler2D uTexture; // static uniform vec2 uTexScale; uniform vec4 uBlendColor; uniform int uIsSky; uniform int uIsWater; uniform vec3 uLightPosition; // static uniform vec4 uLightColor; // static uniform float uLightNear; // static uniform float uLightFar; // static uniform float uLightFadeSize; // static uniform sampler2D uDepthBufferXp; // static uniform sampler2D uDepthBufferXn; // static uniform sampler2D uDepthBufferYp; // static uniform sampler2D uDepthBufferYn; // static uniform sampler2D uDepthBufferZp; // static uniform sampler2D uDepthBufferZn; // static uniform int uBlurQuality; // static uniform float uBlurSize; // static uniform float uBleedLight; in vec3 vPosition; in vec3 vNormal; in vec2 vTexCoord; in float vBrightness; in float vLightBleed; float unpackDepth(vec4 c) { return c.r + c.g / 255.0 + c.b / (255.0 * 255.0); } vec4 texture2Dmap(int map, vec2 tex) { if (map == 0) return _sampleUvRect(uDepthBufferXp, _uUvRect[1], _uTexRepeat[1] > 0, tex); else if (map == 1) return _sampleUvRect(uDepthBufferXn, _uUvRect[2], _uTexRepeat[2] > 0, tex); else if (map == 2) return _sampleUvRect(uDepthBufferYp, _uUvRect[3], _uTexRepeat[3] > 0, tex); else if (map == 3) return _sampleUvRect(uDepthBufferYn, _uUvRect[4], _uTexRepeat[4] > 0, tex); else if (map == 4) return _sampleUvRect(uDepthBufferZp, _uUvRect[5], _uTexRepeat[5] > 0, tex); else return _sampleUvRect(uDepthBufferZn, _uUvRect[6], _uTexRepeat[6] > 0, tex); } vec2 getShadowMapCoord(vec3 look) { float tFOV = tan(PI / 4.0); vec3 u, v, toPoint = vPosition - uLightPosition; vec2 coord; // Prepare 3D to 2D conversion look /= sqrt(dot(look, look)); u = vec3(-look.z * look.x, -look.z * look.y, 1.0 - look.z * look.z); u /= sqrt(dot(u, u)); u *= tFOV; v = vec3(u.y * look.z - look.y * u.z, u.z * look.x - look.z * u.x, u.x * look.y - look.x * u.y); // Convert toPoint /= dot(toPoint,look); coord.x = (dot(toPoint, v) / (tFOV * tFOV) + 1.0) / 2.0; coord.y = (1.0 - dot(toPoint, u) / (tFOV * tFOV)) / 2.0; return coord; } void main() { vec3 light; if (uIsSky > 0) light = vec3(1.0); else { float shadow = 0.0; // Diffuse factor float dif = max(0.0, dot(normalize(vNormal), normalize(uLightPosition - vPosition))); dif = clamp(dif + min(1.0, vLightBleed + uBleedLight), 0.0, 1.0); // Attenuation factor dif *= 1.0 - clamp((distance(vPosition, uLightPosition) - uLightFar * (1.0 - uLightFadeSize)) / (uLightFar * uLightFadeSize), 0.0, 1.0); if (dif > 0.0 && vBrightness < 1.0) { int buffer_; vec2 fragCoord; vec3 toLight = vPosition - uLightPosition; vec4 lookDir = vec4( // Get the direction from the pixel to the light toLight.x / distance(vPosition.xy, uLightPosition.xy), toLight.y / distance(vPosition.xy, uLightPosition.xy), toLight.z / distance(vPosition.xz, uLightPosition.xz), toLight.z / distance(vPosition.yz, uLightPosition.yz) ); // Get shadow map and texture coordinate // Z+ if (lookDir.z > SQRT05 && lookDir.w > SQRT05) { buffer_ = 4; fragCoord = getShadowMapCoord(vec3(0.0, -0.0001, 1.0)); } // Z- else if (lookDir.z < -SQRT05 && lookDir.w < -SQRT05) { buffer_ = 5; fragCoord = getShadowMapCoord(vec3(0.0, -0.0001, -1.0)); } // X+ else if (lookDir.x > SQRT05) { buffer_ = 0; fragCoord = getShadowMapCoord(vec3(1.0, 0.0, 0.0)); } // X- else if (lookDir.x < -SQRT05) { buffer_ = 1; fragCoord = getShadowMapCoord(vec3(-1.0, 0.0, 0.0)); } // Y+ else if (lookDir.y > SQRT05) { buffer_ = 2; fragCoord = getShadowMapCoord(vec3(0.0, 1.0, 0.0)); } // Y- else { buffer_ = 3; fragCoord = getShadowMapCoord(vec3(0.0, -1.0, 0.0)); } // Blur size(Increase if there's light bleeding) float blurSize = uBlurSize + (.2 * min(1.0, vLightBleed + uBleedLight)); // Calculate shadow float fragDepth = distance(vPosition, uLightPosition); float sampleSize = blurSize / fragDepth; float bias = 1.0 + 2.0 * blurSize; for (int i = 0; i < MAXSAMPLES; i++) { if (i < uBlurQuality) { // Sample from circle float angle = (float(i) / float(uBlurQuality)) * TAU; vec2 off = vec2(cos(angle), sin(angle)); // Get sample coordinate and depth vec2 sampleCoord = fragCoord + off * sampleSize; float sampleDepth = uLightNear + (uLightFar - uLightNear) * unpackDepth(texture2Dmap(buffer_, sampleCoord)); // Add to shadow if ((fragDepth - bias) > sampleDepth) shadow += 1.0; } else break; } shadow /= float(uBlurQuality); } // Calculate light if (uIsWater == 1) light = uLightColor.rgb * dif; else light = uLightColor.rgb * dif * (1.0 - shadow); light = mix(light, vec3(1.0), vBrightness); } // Set final color vec2 tex = vTexCoord; if (uTexScale.x < 1.0 || uTexScale.y < 1.0) tex = mod(tex * uTexScale, uTexScale); // GM sprite bug workaround vec4 baseColor = _sampleUvRect(uTexture, _uUvRect[0], _uTexRepeat[0] > 0, tex); out_FragColor = vec4(light, uBlendColor.a * baseColor.a); if (out_FragColor.a == 0.0) discard; } 15:42:40 [WARNING] Loading shader_high_light_point_shadowless fragment shader failed 0(2) : warning C7568: #version 400 not fully supported on current GPU target profile 0(11) : error C1115: unable to find compatible overloaded function "textureQueryLod(sampler2D, vec2)" in App::Shader::Load:240 15:42:40 Fragment code: #version 400 #extension GL_ARB_explicit_attrib_location : enable uniform vec4[1] _uUvRect; uniform int[1] _uTexRepeat; layout(location = 0) out vec4 out_FragColor; vec4 _sampleUvRect(sampler2D s, vec4 uvRect, bool repeat, vec2 uv) { float lod = 0.0; vec2 uvLod = uvRect.xy + uv * uvRect.zw; uvLod.y = 1.0 - uvLod.y; lod = textureQueryLod(s, uvLod).y; if (repeat) uv = mod(uv, vec2(1.0, 1.0)); uv = uvRect.xy + uv * uvRect.zw; uv.y = 1.0 - uv.y; return textureLod(s, uv, lod); } /// ----------------------------------- /// uniform sampler2D uTexture; // static uniform vec2 uTexScale; uniform int uIsSky; uniform int uLightAmount; // static uniform vec4 uLightData[128]; // static uniform float uBrightness; in vec3 vPosition; in vec3 vNormal; in vec4 vColor; in vec2 vTexCoord; in float vBrightness; in float vLightBleed; void main() { vec2 tex = vTexCoord; if (uTexScale.x < 1.0 || uTexScale.y < 1.0) tex = mod(tex * uTexScale, uTexScale); // GM sprite bug workaround vec4 baseColor = vColor * _sampleUvRect(uTexture, _uUvRect[0], _uTexRepeat[0] > 0, tex); // Get base vec3 lightResult = vec3(0.0); if (uIsSky > 0) lightResult = vec3(1.0); else for (int i = 0; i < uLightAmount; i++) { vec4 data1 = uLightData[i * 2]; vec4 data2 = uLightData[i * 2 + 1]; vec3 lightPosition = data1.xyz; float lightRange = data1.w, dis, att; float lightFadeSize = data2.w; // No use in shading a pixel if it's not in range if (distance(vPosition, lightPosition) > lightRange) continue; // Diffuse factor float dif = max(0.0, dot(normalize(vNormal), normalize(lightPosition - vPosition))); dif += vLightBleed; // Attenuation factor dif *= 1.0 - clamp((distance(vPosition, lightPosition) - lightRange * (1.0 - lightFadeSize)) / (lightRange * lightFadeSize), 0.0, 1.0); // Calculate light vec3 light; light = data2.rgb * dif; light = mix(light, vec3(1.0), vBrightness); lightResult.rgb += light; } out_FragColor = vec4(lightResult, baseColor.a); if (out_FragColor.a == 0.0) discard; } 15:42:40 [WARNING] Loading shader_high_light_spot fragment shader failed 0(2) : warning C7568: #version 400 not fully supported on current GPU target profile 0(14) : error C1115: unable to find compatible overloaded function "textureQueryLod(sampler2D, vec2)" in App::Shader::Load:240 15:42:40 Fragment code: #version 400 #extension GL_ARB_explicit_attrib_location : enable uniform vec4[2] _uUvRect; uniform int[2] _uTexRepeat; #define MAXSAMPLES 64 #define TAU PI * 2.0 #define PI 3.14159265 layout(location = 0) out vec4 out_FragColor; vec4 _sampleUvRect(sampler2D s, vec4 uvRect, bool repeat, vec2 uv) { float lod = 0.0; vec2 uvLod = uvRect.xy + uv * uvRect.zw; uvLod.y = 1.0 - uvLod.y; lod = textureQueryLod(s, uvLod).y; if (repeat) uv = mod(uv, vec2(1.0, 1.0)); uv = uvRect.xy + uv * uvRect.zw; uv.y = 1.0 - uv.y; return textureLod(s, uv, lod); } /// ----------------------------------- /// uniform sampler2D uTexture; // static uniform vec2 uTexScale; uniform vec4 uBlendColor; uniform int uIsSky; uniform int uIsWater; uniform vec3 uLightPosition; // static uniform vec4 uLightColor; // static uniform float uLightNear; // static uniform float uLightFar; // static uniform float uLightFadeSize; // static uniform float uLightSpotSharpness; // static uniform sampler2D uDepthBuffer; // static uniform int uBlurQuality; // static uniform float uBlurSize; // static uniform float uBleedLight; in vec3 vPosition; in vec3 vNormal; in vec2 vTexCoord; in vec4 vScreenCoord; in float vBrightness; in float vLightBleed; float unpackDepth(vec4 c) { return c.r + c.g / 255.0 + c.b / (255.0 * 255.0); } void main() { vec3 light; if (uIsSky > 0) light = vec3(1.0); else { float dif = 0.0; float shadow = 0.0; // Check if not behind the spot light if (vScreenCoord.w > 0.0) { // Diffuse factor dif = max(0.0, dot(normalize(vNormal), normalize(uLightPosition - vPosition))); dif = clamp(dif + min(1.0, vLightBleed + uBleedLight), 0.0, 1.0); // Attenuation factor dif *= 1.0 - clamp((distance(vPosition, uLightPosition) - uLightFar * (1.0 - uLightFadeSize)) / (uLightFar * uLightFadeSize), 0.0, 1.0); if (dif > 0.0 && vBrightness < 1.0) { float fragDepth = min(vScreenCoord.z, uLightFar); vec2 fragCoord = (vec2(vScreenCoord.x, -vScreenCoord.y) / vScreenCoord.z + 1.0) / 2.0; // Texture position must be valid if (fragCoord.x > 0.0 && fragCoord.y > 0.0 && fragCoord.x < 1.0 && fragCoord.y < 1.0) { // Blur size(Increase if there's light bleeding) float blurSize = uBlurSize + (.2 * min(1.0, vLightBleed + uBleedLight)); // Create circle dif *= 1.0 - clamp((distance(fragCoord, vec2(0.5, 0.5)) - 0.5 * uLightSpotSharpness) / (0.5 * max(0.01, 1.0 - uLightSpotSharpness)), 0.0, 1.0); // Calculate bias float bias = 0.1 * (uLightFar / fragDepth); // Calculate sample size float sampleSize = uBlurSize / fragDepth; // Find shadow for (int i = 0; i < MAXSAMPLES; i++) { if (i < uBlurQuality) { // Sample from circle float angle = (float(i) / float(uBlurQuality)) * TAU; vec2 off = vec2(cos(angle), sin(angle)); // Get sample depth vec2 sampleCoord = fragCoord + off * sampleSize; float sampleDepth = uLightNear + unpackDepth(_sampleUvRect(uDepthBuffer, _uUvRect[1], _uTexRepeat[1] > 0, sampleCoord)) * (uLightFar - uLightNear); // Add to shadow shadow += ((fragDepth - bias) > sampleDepth) ? 1.0 : 0.0; } else break; } shadow /= float(uBlurQuality); } else dif = 0.0; } } // Calculate light if (uIsWater == 1) light = uLightColor.rgb * dif; else light = uLightColor.rgb * dif * (1.0 - shadow); light = mix(light, vec3(1.0), vBrightness); } // Set final color vec2 tex = vTexCoord; if (uTexScale.x < 1.0 || uTexScale.y < 1.0) tex = mod(tex * uTexScale, uTexScale); // GM sprite bug workaround vec4 baseColor = _sampleUvRect(uTexture, _uUvRect[0], _uTexRepeat[0] > 0, tex); out_FragColor = vec4(light, uBlendColor.a * baseColor.a); if (out_FragColor.a == 0.0) discard; } 15:42:40 [WARNING] Loading shader_high_light_sun fragment shader failed 0(2) : warning C7568: #version 400 not fully supported on current GPU target profile 0(14) : error C1115: unable to find compatible overloaded function "textureQueryLod(sampler2D, vec2)" in App::Shader::Load:240 15:42:40 Fragment code: #version 400 #extension GL_ARB_explicit_attrib_location : enable uniform vec4[2] _uUvRect; uniform int[2] _uTexRepeat; #define MAXSAMPLES 64 #define TAU PI * 2.0 #define PI 3.14159265 layout(location = 0) out vec4 out_FragColor; vec4 _sampleUvRect(sampler2D s, vec4 uvRect, bool repeat, vec2 uv) { float lod = 0.0; vec2 uvLod = uvRect.xy + uv * uvRect.zw; uvLod.y = 1.0 - uvLod.y; lod = textureQueryLod(s, uvLod).y; if (repeat) uv = mod(uv, vec2(1.0, 1.0)); uv = uvRect.xy + uv * uvRect.zw; uv.y = 1.0 - uv.y; return textureLod(s, uv, lod); } /// ----------------------------------- /// uniform sampler2D uTexture; // static uniform vec2 uTexScale; uniform vec4 uBlendColor; uniform int uIsSky; uniform int uIsWater; uniform vec3 uLightPosition; // static uniform vec4 uLightColor; // static uniform float uLightNear; // static uniform float uLightFar; // static uniform sampler2D uDepthBuffer; // static uniform int uBlurQuality; // static uniform float uBlurSize; // static uniform float uDiffuseBoost; // static uniform float uBleedLight; in vec3 vPosition; in float vDepth; in vec3 vNormal; in vec2 vTexCoord; in vec4 vScreenCoord; in float vBrightness; in float vLightBleed; float unpackDepth(vec4 c) { return c.r + c.g / 255.0 + c.b / (255.0 * 255.0); } void main() { vec3 light; if (uIsSky > 0) light = vec3(1.0); else { // Diffuse factor float dif = max(0.0, dot(normalize(vNormal), normalize(uLightPosition - vPosition))); dif = clamp(dif + min(1.0, vLightBleed + uBleedLight), 0.0, 1.0); float shadow = 0.0; if (dif > 0.0 && vBrightness < 1.0) { dif *= uDiffuseBoost; float fragDepth = min(vScreenCoord.z, uLightFar); vec2 fragCoord = (vec2(vScreenCoord.x, -vScreenCoord.y) / vScreenCoord.z + 1.0) / 2.0; // Texture position must be valid if (fragCoord.x > 0.0 && fragCoord.y > 0.0 && fragCoord.x < 1.0 && fragCoord.y < 1.0) { // Blur size(Increase if there's light bleeding) float blurSize = uBlurSize + (.2 * min(1.0, vLightBleed + uBleedLight)); // Calculate bias float bias = 1.0 + (uLightFar / fragDepth) * blurSize; // Calculate sample size float sampleSize = blurSize / fragDepth; // Find shadow for (int i = 0; i < MAXSAMPLES; i++) { if (i < uBlurQuality) { // Sample from circle float angle = (float(i) / float(uBlurQuality)) * TAU; vec2 off = vec2(cos(angle), sin(angle)); // Get sample depth vec2 sampleCoord = fragCoord + off * sampleSize; float sampleDepth = uLightNear + unpackDepth(_sampleUvRect(uDepthBuffer, _uUvRect[1], _uTexRepeat[1] > 0, sampleCoord)) * (uLightFar - uLightNear); // Add to shadow shadow += ((fragDepth - bias) > sampleDepth) ? 1.0 : 0.0; } else break; } shadow /= float(uBlurQuality); } } // Calculate light if (uIsWater == 1) light = uLightColor.rgb * dif; else light = uLightColor.rgb * dif * (1.0 - shadow); light = mix(light, vec3(1.0), vBrightness); } // Set final color vec2 tex = vTexCoord; if (uTexScale.x < 1.0 || uTexScale.y < 1.0) tex = mod(tex * uTexScale, uTexScale); // GM sprite bug workaround vec4 baseColor = _sampleUvRect(uTexture, _uUvRect[0], _uTexRepeat[0] > 0, tex); out_FragColor = vec4(light, uBlendColor.a * baseColor.a); if (out_FragColor.a == 0.0) discard; } 15:42:40 [WARNING] Loading shader_high_ssao fragment shader failed 0(2) : warning C7568: #version 400 not fully supported on current GPU target profile 0(12) : error C1115: unable to find compatible overloaded function "textureQueryLod(sampler2D, vec2)" in App::Shader::Load:240 15:42:40 Fragment code: #version 400 #extension GL_ARB_explicit_attrib_location : enable uniform vec4[4] _uUvRect; uniform int[4] _uTexRepeat; #define SAMPLES 16 layout(location = 0) out vec4 out_FragColor; vec4 _sampleUvRect(sampler2D s, vec4 uvRect, bool repeat, vec2 uv) { float lod = 0.0; vec2 uvLod = uvRect.xy + uv * uvRect.zw; uvLod.y = 1.0 - uvLod.y; lod = textureQueryLod(s, uvLod).y; if (repeat) uv = mod(uv, vec2(1.0, 1.0)); uv = uvRect.xy + uv * uvRect.zw; uv.y = 1.0 - uv.y; return textureLod(s, uv, lod); } /// ----------------------------------- /// in vec2 vTexCoord; uniform sampler2D uDepthBuffer; uniform sampler2D uNormalBuffer; uniform sampler2D uBrightnessBuffer; uniform sampler2D uNoiseBuffer; uniform float uNear; uniform float uFar; uniform mat4 uProjMatrix; uniform mat4 uProjMatrixInv; uniform vec2 uScreenSize; uniform vec3 uKernel[SAMPLES]; uniform float uRadius; uniform float uPower; uniform vec4 uColor; // Get depth Value float unpackDepth(vec4 c) { return c.r + c.g / 255.0 + c.b / (255.0 * 255.0); } // Get normal Value vec3 unpackNormal(vec4 c) { return c.rgb * 2.0 - 1.0; } // Transform linear depth to exponential depth float transformDepth(float depth) { return (uFar - (uNear * uFar) / (depth * (uFar - uNear) + uNear)) / (uFar - uNear); } // Reconstruct a position from a screen space coordinate and (linear) depth vec3 posFromBuffer(vec2 coord, float depth) { vec4 pos = uProjMatrixInv * vec4(coord.x * 2.0 - 1.0, 1.0 - coord.y * 2.0, transformDepth(depth), 1.0); return pos.xyz / pos.w; } void main() { // Perform alpha test to ignore background if (_sampleUvRect(uDepthBuffer, _uUvRect[0], _uTexRepeat[0] > 0, vTexCoord).a < 1.0) discard; // Get view space origin float originDepth = unpackDepth(_sampleUvRect(uDepthBuffer, _uUvRect[0], _uTexRepeat[0] > 0,vTexCoord)); vec3 origin = posFromBuffer(vTexCoord, originDepth); // Get scaled radius float sampleRadius = uRadius * (1.0 - originDepth); // Get normal vec3 normal = unpackNormal(_sampleUvRect(uNormalBuffer, _uUvRect[1], _uTexRepeat[1] > 0, vTexCoord)); // Random vector from noise vec2 noiseScale = (uScreenSize / 4.0); vec3 randVec = unpackNormal(_sampleUvRect(uNoiseBuffer, _uUvRect[3], _uTexRepeat[3] > 0, vTexCoord * noiseScale)); // Construct kernel basis matrix vec3 tangent = normalize(randVec - normal * dot(randVec, normal)); vec3 bitangent = cross(normal, tangent); mat3 kernelBasis = mat3(tangent, bitangent, normal); // Calculate occlusion factor float occlusion = 0.0; for (int i = 0; i < SAMPLES; i++) { // Get sample position vec3 samplePos = origin + (kernelBasis * uKernel[i]) * sampleRadius; // Project sample position vec4 sampleScreen = uProjMatrix * vec4(samplePos, 1.0); vec2 sampleCoord = (sampleScreen.xy / sampleScreen.w) * 0.5 + 0.5; sampleCoord.y = 1.0 - sampleCoord.y; // Get sample depth float sampleDepth = posFromBuffer(sampleCoord, unpackDepth(_sampleUvRect(uDepthBuffer, _uUvRect[0], _uTexRepeat[0] > 0, sampleCoord))).z; // Get sample brightness float sampleBrightness = _sampleUvRect(uBrightnessBuffer, _uUvRect[2], _uTexRepeat[2] > 0, sampleCoord).r; // Add occlusion if checks succeed float bias = originDepth * 50.0; float depthCheck = (sampleDepth <= (samplePos.z - bias)) ? 1.0 : 0.0; float rangeCheck = smoothstep(0.0, 1.0, sampleRadius / abs(origin.z - sampleDepth)); occlusion += depthCheck * rangeCheck * sampleBrightness;//depthCheck * rangeCheck * uPower * ampleBrightness; } // Raise to power occlusion = 1.0 - pow(max(0.0, 1.0 - occlusion / float(SAMPLES)), uPower); // Apply brightness occlusion *= _sampleUvRect(uBrightnessBuffer, _uUvRect[2], _uTexRepeat[2] > 0, vTexCoord).r; occlusion = clamp(occlusion, 0.0, 1.0); // Mix out_FragColor = mix(vec4(1.0), uColor, occlusion); } 15:42:40 [WARNING] Loading shader_high_ssao_blur fragment shader failed 0(2) : warning C7568: #version 400 not fully supported on current GPU target profile 0(13) : error C1115: unable to find compatible overloaded function "textureQueryLod(sampler2D, vec2)" in App::Shader::Load:240 15:42:40 Fragment code: #version 400 #extension GL_ARB_explicit_attrib_location : enable uniform vec4[3] _uUvRect; uniform int[3] _uTexRepeat; #define SAMPLES 4 #define DEPTH_SENSITIVITY 20.0 layout(location = 0) out vec4 out_FragColor; vec4 _sampleUvRect(sampler2D s, vec4 uvRect, bool repeat, vec2 uv) { float lod = 0.0; vec2 uvLod = uvRect.xy + uv * uvRect.zw; uvLod.y = 1.0 - uvLod.y; lod = textureQueryLod(s, uvLod).y; if (repeat) uv = mod(uv, vec2(1.0, 1.0)); uv = uvRect.xy + uv * uvRect.zw; uv.y = 1.0 - uv.y; return textureLod(s, uv, lod); } uniform sampler2D _uBaseTexture; /// ----------------------------------- /// in vec2 vTexCoord; uniform sampler2D uDepthBuffer; uniform sampler2D uNormalBuffer; uniform vec2 uScreenSize; uniform vec2 uPixelCheck; // Get Depth Value float unpackDepth(vec4 c) { return c.r + c.g / 255.0 + c.b / (255.0 * 255.0); } // Get Normal Value vec3 unpackNormal(vec4 c) { return c.rgb * 2.0 - 1.0; } void main() { float centerDepth = unpackDepth(_sampleUvRect(uDepthBuffer, _uUvRect[1], _uTexRepeat[1] > 0, vTexCoord)); vec3 centerNormal = unpackNormal(_sampleUvRect(uNormalBuffer, _uUvRect[2], _uTexRepeat[2] > 0, vTexCoord)); // Turn the pixel into a texel. As depth increases, the radius decreases. vec2 texelCheck = (uPixelCheck / uScreenSize) * (1.0 - centerDepth); // Setup blur weights float weights[SAMPLES + 1]; weights[0] = 70.0; weights[1] = 56.0; weights[2] = 28.0; weights[3] = 8.0; weights[4] = 1.0; vec4 ssao = _sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, vTexCoord) * weights[0]; float totalWeight = weights[0]; // Sample dis crap for (int i = 0; i < SAMPLES; i += 1) { // Get the sample uv coordinates vec2 sampleOffset = float(i + 1) * texelCheck; // Positive direction vec2 sampleCoords = vTexCoord + sampleOffset; float sampleDepth = unpackDepth(_sampleUvRect(uDepthBuffer, _uUvRect[1], _uTexRepeat[1] > 0, sampleCoords)); vec3 sampleNormal = unpackNormal(_sampleUvRect(uNormalBuffer, _uUvRect[2], _uTexRepeat[2] > 0, sampleCoords)); float weight = max(0.0, dot(centerNormal, sampleNormal) - abs(sampleDepth - centerDepth) * DEPTH_SENSITIVITY) * weights[i + 1]; ssao += _sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, sampleCoords) * weight; totalWeight += weight; // Negative direction sampleCoords = vTexCoord - sampleOffset; sampleDepth = unpackDepth(_sampleUvRect(uDepthBuffer, _uUvRect[1], _uTexRepeat[1] > 0, sampleCoords )); sampleNormal = unpackNormal(_sampleUvRect(uNormalBuffer, _uUvRect[2], _uTexRepeat[2] > 0, sampleCoords)); weight = max(0.0, max(0.0, dot(centerNormal, sampleNormal) * 0.8 + 0.2) - abs(sampleDepth - centerDepth) * DEPTH_SENSITIVITY) * weights[i + 1]; ssao += _sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, sampleCoords) * weight; totalWeight += weight; } out_FragColor = ssao / totalWeight; } 15:42:40 [WARNING] Loading shader_high_ssao_depth_normal fragment shader failed 0(2) : warning C7568: #version 400 not fully supported on current GPU target profile 0(13) : error C1115: unable to find compatible overloaded function "textureQueryLod(sampler2D, vec2)" in App::Shader::Load:240 15:42:40 Fragment code: #version 400 #extension GL_ARB_explicit_attrib_location : enable uniform vec4[1] _uUvRect; uniform int[1] _uTexRepeat; layout(location = 0) out vec4 out_FragData0; layout(location = 1) out vec4 out_FragData1; layout(location = 2) out vec4 out_FragData2; vec4 _sampleUvRect(sampler2D s, vec4 uvRect, bool repeat, vec2 uv) { float lod = 0.0; vec2 uvLod = uvRect.xy + uv * uvRect.zw; uvLod.y = 1.0 - uvLod.y; lod = textureQueryLod(s, uvLod).y; if (repeat) uv = mod(uv, vec2(1.0, 1.0)); uv = uvRect.xy + uv * uvRect.zw; uv.y = 1.0 - uv.y; return textureLod(s, uv, lod); } /// ----------------------------------- /// uniform vec4 uBlendColor; uniform float uBrightness; uniform int uSSAOEnable; uniform sampler2D uTexture; // static uniform vec2 uTexScale; in vec4 vPosition; in vec2 vTexCoord; in float vDepth; in vec3 vNormal; in vec4 vColor; in vec4 vCustom; vec4 packDepth(float f) { return vec4(floor(f * 255.0) / 255.0, fract(f * 255.0), fract(f * 255.0 * 255.0), 1.0); } vec4 packNormal(vec3 n) { return vec4((n + vec3(1.0, 1.0, 1.0)) * 0.5, 1.0); } void main() { vec2 tex = vTexCoord; if (uTexScale.x < 1.0 || uTexScale.y < 1.0) tex = mod(tex * uTexScale, uTexScale); // GM sprite bug workaround vec4 baseColor = uBlendColor * _sampleUvRect(uTexture, _uUvRect[0], _uTexRepeat[0] > 0, tex); if (floor(baseColor.a * 255.0) < 254.0) discard; // Depth out_FragData0 = packDepth(vDepth); // Normal out_FragData1 = packNormal(normalize(vNormal)); // Brightness of SSAO float br; if (uSSAOEnable > 0) br = max(0.0, baseColor.a - (uBrightness + vCustom.z)); else br = 0.0; out_FragData2 = vec4(br, br, br, 1.0); } 15:42:40 [WARNING] Loading shader_noise fragment shader failed 0(2) : warning C7568: #version 400 not fully supported on current GPU target profile 0(11) : error C1115: unable to find compatible overloaded function "textureQueryLod(sampler2D, vec2)" in App::Shader::Load:240 15:42:40 Fragment code: #version 400 #extension GL_ARB_explicit_attrib_location : enable uniform vec4[2] _uUvRect; uniform int[2] _uTexRepeat; layout(location = 0) out vec4 out_FragColor; vec4 _sampleUvRect(sampler2D s, vec4 uvRect, bool repeat, vec2 uv) { float lod = 0.0; vec2 uvLod = uvRect.xy + uv * uvRect.zw; uvLod.y = 1.0 - uvLod.y; lod = textureQueryLod(s, uvLod).y; if (repeat) uv = mod(uv, vec2(1.0, 1.0)); uv = uvRect.xy + uv * uvRect.zw; uv.y = 1.0 - uv.y; return textureLod(s, uv, lod); } uniform sampler2D _uBaseTexture; /// ----------------------------------- /// in vec2 vTexCoord; uniform sampler2D uNoiseBuffer; uniform float uTime; uniform float uStrength; uniform float uSaturation; uniform vec2 uSize; uniform vec2 uScreenSize; vec4 hsbtorgb(vec4 c) { vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); return vec4(c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y), c.a); } void main() { vec4 baseColor = _sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, vTexCoord); vec2 coords = vTexCoord * (uScreenSize / uSize); vec4 noisecolor = _sampleUvRect(uNoiseBuffer, _uUvRect[1], _uTexRepeat[1] > 0, coords); vec3 W = vec3(0.2125, 0.7154, 0.0721); vec3 satIntensity = vec3(dot(noisecolor.rgb, W)); noisecolor.rgb = mix(satIntensity, noisecolor.rgb, uSaturation); baseColor.rgb += vec3(noisecolor.rgb) * uStrength; out_FragColor = vec4(baseColor); } 15:42:40 [WARNING] Loading shader_replace fragment shader failed 0(2) : warning C7568: #version 400 not fully supported on current GPU target profile 0(11) : error C1115: unable to find compatible overloaded function "textureQueryLod(sampler2D, vec2)" in App::Shader::Load:240 15:42:40 Fragment code: #version 400 #extension GL_ARB_explicit_attrib_location : enable uniform vec4[1] _uUvRect; uniform int[1] _uTexRepeat; layout(location = 0) out vec4 out_FragColor; vec4 _sampleUvRect(sampler2D s, vec4 uvRect, bool repeat, vec2 uv) { float lod = 0.0; vec2 uvLod = uvRect.xy + uv * uvRect.zw; uvLod.y = 1.0 - uvLod.y; lod = textureQueryLod(s, uvLod).y; if (repeat) uv = mod(uv, vec2(1.0, 1.0)); uv = uvRect.xy + uv * uvRect.zw; uv.y = 1.0 - uv.y; return textureLod(s, uv, lod); } /// ----------------------------------- /// uniform sampler2D uTexture; // static uniform vec2 uTexScale; uniform vec4 uReplaceColor; in vec2 vTexCoord; void main() { vec2 tex = vTexCoord; if (uTexScale.x < 1.0 || uTexScale.y < 1.0) tex = mod(tex * uTexScale, uTexScale); // GM sprite bug workaround out_FragColor = vec4(uReplaceColor.rgb, ceil(_sampleUvRect(uTexture, _uUvRect[0], _uTexRepeat[0] > 0, tex).a)); if (out_FragColor.a == 0.0) discard; } 15:42:40 [WARNING] Loading shader_vignette fragment shader failed 0(2) : warning C7568: #version 400 not fully supported on current GPU target profile 0(11) : error C1115: unable to find compatible overloaded function "textureQueryLod(sampler2D, vec2)" in App::Shader::Load:240 15:42:40 Fragment code: #version 400 #extension GL_ARB_explicit_attrib_location : enable uniform vec4[1] _uUvRect; uniform int[1] _uTexRepeat; layout(location = 0) out vec4 out_FragColor; vec4 _sampleUvRect(sampler2D s, vec4 uvRect, bool repeat, vec2 uv) { float lod = 0.0; vec2 uvLod = uvRect.xy + uv * uvRect.zw; uvLod.y = 1.0 - uvLod.y; lod = textureQueryLod(s, uvLod).y; if (repeat) uv = mod(uv, vec2(1.0, 1.0)); uv = uvRect.xy + uv * uvRect.zw; uv.y = 1.0 - uv.y; return textureLod(s, uv, lod); } uniform sampler2D _uBaseTexture; /// ----------------------------------- /// in vec2 vTexCoord; uniform vec2 uScreenSize; uniform float uRadius; uniform float uSoftness; uniform float uStrength; uniform vec4 uColor; void main() { vec2 centerCoord = (vTexCoord) - vec2(0.5); float len = length(centerCoord); float amount = smoothstep(uRadius, uRadius - clamp(uSoftness, 0.005, 1.0), len); // Get base vec4 baseColor = _sampleUvRect(_uBaseTexture, _uUvRect[0], _uTexRepeat[0] > 0, vTexCoord); baseColor.rgb = mix(baseColor.rgb, mix(uColor.rgb, baseColor.rgb, amount), uStrength); out_FragColor = baseColor; } 15:42:40 Create vertex format 15:42:40 Shader init 15:42:40 shaders_are_supported: yes 15:42:40 shader_distort compiled: no 15:42:40 Shader compilation failed 15:42:58 App end requested
  2. I didn't have this in previous versions. Tell me what to do
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...