diff options
Diffstat (limited to '')
-rw-r--r-- | cwd/assets/altcraft/shaders/frag/blur.fs | 2 | ||||
-rw-r--r-- | cwd/assets/altcraft/shaders/frag/light.fs | 4 | ||||
-rw-r--r-- | cwd/assets/altcraft/shaders/frag/ssao.fs | 4 |
3 files changed, 6 insertions, 4 deletions
diff --git a/cwd/assets/altcraft/shaders/frag/blur.fs b/cwd/assets/altcraft/shaders/frag/blur.fs index b49032f..89d4498 100644 --- a/cwd/assets/altcraft/shaders/frag/blur.fs +++ b/cwd/assets/altcraft/shaders/frag/blur.fs @@ -18,5 +18,5 @@ void main() { result += texture(blurInput, uv + offset); } } - fragColor = result / pow(blurScale, 3); + fragColor = result / pow(blurScale * 2.0f, 2); } diff --git a/cwd/assets/altcraft/shaders/frag/light.fs b/cwd/assets/altcraft/shaders/frag/light.fs index d1763f9..c7e7254 100644 --- a/cwd/assets/altcraft/shaders/frag/light.fs +++ b/cwd/assets/altcraft/shaders/frag/light.fs @@ -43,7 +43,7 @@ void main() { float lightLevel = clamp(faceLight + skyLight * dayTime, 0.01f, 1.0f); lightLevel = pow(lightLevel, 3); if (applySsao) { - lightLevel *= (1.0f - s.r); + lightLevel *= pow(s.r, 2); } lightLevel = clamp(lightLevel, 0.005f, 1.0f); @@ -74,7 +74,7 @@ void main() { fragColor = vec4(vec3(d), 1.0f); break; case 7: - fragColor = s; + fragColor = vec4(pow(s.r, 2)); break; } } diff --git a/cwd/assets/altcraft/shaders/frag/ssao.fs b/cwd/assets/altcraft/shaders/frag/ssao.fs index f4fea34..0615e8f 100644 --- a/cwd/assets/altcraft/shaders/frag/ssao.fs +++ b/cwd/assets/altcraft/shaders/frag/ssao.fs @@ -51,5 +51,7 @@ void main() { occlusion += (sampleDepth >= samplePos.z + bias ? 1.0 : 0.0) * rangeCheck; } - fragColor = vec4(vec3(occlusion / kernelSize), 1.0f); + occlusion = 1.0f - (occlusion / kernelSize); + + fragColor = vec4(vec3(occlusion), 1.0f); } |