diff options
author | Ptolemy <ptolemy@lindenlab.com> | 2022-06-24 08:02:53 -0700 |
---|---|---|
committer | Ptolemy <ptolemy@lindenlab.com> | 2022-06-24 08:02:53 -0700 |
commit | a68b6087deb68a824c2b9e8ccb1111c6c8b70045 (patch) | |
tree | 463ca33f41dd54db3266af1239152c2586f9e82e /indra | |
parent | 33116b8adac6eec07c5badc08d7d66ca1283686a (diff) |
SL-17273: Expand GBuffer for PBR emissive
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/pipeline.cpp | 8 |
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() : |