summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-06-24 11:13:54 -0500
committerDave Parks <davep@lindenlab.com>2022-06-24 11:13:54 -0500
commit34ee8eb2773b2f55fe917d16eb9c9a1481d3af8a (patch)
tree7f802443bd30319013f7458e17e4ed5c374b36cc /indra/newview/pipeline.cpp
parentbce1e9a51581fc42072dbc1448db38e5069c7378 (diff)
parent14cba35bbce3f2103d34e02eb312981cb4789a0c (diff)
Merge branch 'DRTVWR-559' of ssh://bitbucket.org/lindenlab/viewer into DRTVWR-559
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--indra/newview/pipeline.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 82a5b28576..ac9c385405 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -372,8 +372,12 @@ void validate_framebuffer_object();
// for_impostor -- whether or not these render targets are for an impostor (if true, avoids implicit sRGB conversions)
bool addDeferredAttachments(LLRenderTarget& target, bool for_impostor = false)
{
- return target.addColorAttachment(for_impostor ? GL_RGBA : GL_SRGB8_ALPHA8) && //specular
- target.addColorAttachment(GL_RGB10_A2); //normal+z
+ bool pbr = gSavedSettings.getBOOL("RenderPBR");
+ bool valid = true
+ && target.addColorAttachment(for_impostor ? GL_RGBA : GL_SRGB8_ALPHA8) // frag-data[1] specular or PBR packed OcclusionRoughnessMetal
+ && target.addColorAttachment(GL_RGB10_A2) // frag_data[2] normal+z+fogmask, See: class1\deferred\materialF.glsl & softenlight
+ && (pbr ? target.addColorAttachment(GL_RGBA) : true); // frag_data[3] emissive
+ return valid;
}
LLPipeline::LLPipeline() :