From 0b6e69de7e24b389a6f8b8bc815b147f5513275d Mon Sep 17 00:00:00 2001 From: Shyotl Date: Thu, 23 Jul 2015 01:38:03 -0500 Subject: [PATCH] Better handling of texture filtering in deferred post-process passes. TODO: Investigate incorrect fxaa behavior when resolution divisor isn't 1.0. --- indra/newview/pipeline.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 9989eb8a9..f0f71c112 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -7301,6 +7301,11 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield, b drawFullScreenRect(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0); + if (channel > -1) + { + gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT); + } + unbindDeferredShader(*shader); if (multisample) @@ -7323,6 +7328,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield, b if (channel > -1) { mScreen.bindTexture(0, channel); + gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR); } if (!LLViewerCamera::getInstance()->cameraUnderWater()) @@ -7334,6 +7340,11 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield, b drawFullScreenRect(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0); + if (channel > -1) + { + gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_POINT); + } + unbindDeferredShader(*shader); if (multisample) @@ -7360,6 +7371,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield, b if (channel > -1) { mDeferredLight.bindTexture(0, channel); + gGL.getTexUnit(channel)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR); } drawFullScreenRect(LLVertexBuffer::MAP_VERTEX);