Compare commits
2 commits
3e9cb72a58
...
eb81a9426a
Author | SHA1 | Date | |
---|---|---|---|
eb81a9426a | |||
6be09aac47 |
1 changed files with 5 additions and 1 deletions
|
@ -12,7 +12,11 @@ vec2 depthOfField() {
|
|||
float distance = depth - centerDepthSmooth;
|
||||
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;
|
||||
float offset = (ceil(virtualSize * 0.5) - 0.5) / virtualSize;
|
||||
|
||||
|
|
Loading…
Reference in a new issue