From 58cd744a2f4ef8955b1b404e55b7a02c0d6a3681 Mon Sep 17 00:00:00 2001 From: Valerie Date: Thu, 18 Apr 2024 17:02:53 -0400 Subject: [PATCH] retuned depth of field blur calculation --- shaders/module/dof.frag | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shaders/module/dof.frag b/shaders/module/dof.frag index 8d860f3..d40d260 100644 --- a/shaders/module/dof.frag +++ b/shaders/module/dof.frag @@ -10,7 +10,7 @@ const float centerDepthSmoothHalfLife = 16f; vec2 depthOfField() { float depth = texture2D(depthtex1, texcoord).x; float distance = depth - centerDepthSmooth; - int stops = max(min(int(distance * 96), 5), 0); + int stops = max(min(int(sqrt(distance * 256)), 5), 0); #if pixelSize > 1 float virtualSize = pow(float(pixelSize), 1 + stops);