retuned depth of field blur calculation
This commit is contained in:
parent
14d63278ec
commit
1fa7b2589b
1 changed files with 1 additions and 1 deletions
|
@ -10,7 +10,7 @@ const float centerDepthSmoothHalfLife = 16f;
|
||||||
vec2 depthOfField() {
|
vec2 depthOfField() {
|
||||||
float depth = texture2D(depthtex1, texcoord).x;
|
float depth = texture2D(depthtex1, texcoord).x;
|
||||||
float distance = depth - centerDepthSmooth;
|
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
|
#if pixelSize > 1
|
||||||
float virtualSize = pow(float(pixelSize), 1 + stops);
|
float virtualSize = pow(float(pixelSize), 1 + stops);
|
||||||
|
|
Loading…
Reference in a new issue