retuned depth of field blur calculation

This commit is contained in:
Valerie Wolfe 2024-04-18 17:02:53 -04:00
parent 14d63278ec
commit 1fa7b2589b

View file

@ -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);