Compare commits

..

2 commits

Author SHA1 Message Date
eb81a9426a Merge branch 'fx' into experimental 2024-04-15 16:07:49 -04:00
6be09aac47 fixed DoF not working with downscale off 2024-04-14 18:48:16 -04:00

View file

@ -12,7 +12,11 @@ vec2 depthOfField() {
float distance = depth - centerDepthSmooth; float distance = depth - centerDepthSmooth;
int stops = max(min(int(distance * 96), 5), 0); int stops = max(min(int(distance * 96), 5), 0);
float virtualSize = pow(float(pixelSize), 1 + stops);//1 + stops); #if pixelSize > 1
float virtualSize = pow(float(pixelSize), 1 + stops);
#else
float virtualSize = pow(2f, stops);
#endif
vec2 view = vec2(viewWidth, viewHeight) / virtualSize; vec2 view = vec2(viewWidth, viewHeight) / virtualSize;
float offset = (ceil(virtualSize * 0.5) - 0.5) / virtualSize; float offset = (ceil(virtualSize * 0.5) - 0.5) / virtualSize;