diff options
author | Dave Parks <davep@lindenlab.com> | 2011-11-04 17:27:33 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-11-04 17:27:33 -0500 |
commit | 0a43fdd07e3b084ce230086c032ccef79f1df429 (patch) | |
tree | dd10d2c6a14c470d11fd9ec6ef0cfff9fc418b7b | |
parent | 367d6212ae9e18c398c25fe9e11646bfc801fd90 (diff) |
SH-2652 Even faster DoF -- also fix for screen going black when DoF enabled but shadows are not.
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl | 4 | ||||
-rw-r--r-- | indra/newview/pipeline.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl index 629648ddc3..bf029d1db5 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl @@ -73,7 +73,7 @@ void main() { while (sc > 0.5) { - int its = int(max(1.0,(sc*3.7))); + int its = int(max(1.0,(sc*3.7*0.5))); for (int i=0; i<its; ++i) { float ang = sc+i*2*PI/its; // sc is added for rotary perturbance @@ -82,7 +82,7 @@ void main() // you could test sample coords against an interesting non-circular aperture shape here, if desired. dofSample(diff, w, sc, vary_fragcoord.xy + vec2(samp_x,samp_y)); } - sc -= 1.0; + sc -= 2.0; } } diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 1fff954b96..d524ddd62d 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -745,8 +745,8 @@ bool LLPipeline::allocateScreenBuffer(U32 resX, U32 resY, U32 samples) mFXAABuffer.release(); } - if (shadow_detail > 0 || ssao) - { //only need mDeferredLight for shadows OR ssao + if (shadow_detail > 0 || ssao || RenderDepthOfField) + { //only need mDeferredLight for shadows OR ssao OR dof if (!mDeferredLight.allocate(resX, resY, GL_RGBA, FALSE, FALSE, LLTexUnit::TT_RECT_TEXTURE, FALSE)) return false; } else |