diff options
author | Dave Parks <davep@lindenlab.com> | 2022-04-11 20:06:33 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-04-11 20:06:33 -0500 |
commit | e33f23f58a2caa561dfe4b3b114786f40983d136 (patch) | |
tree | bfde276b90a3dfdb004abf96e530dbb7144fe8ea /indra/newview/pipeline.cpp | |
parent | cb6e1ac4a8a9c459202e1fcc27c1067c61d2ce26 (diff) |
SL-17194 Impostor quality pass 2 (and fix for fully transparent rigged attachments rendering to depth buffer)
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r-- | indra/newview/pipeline.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index ccf5b69ea0..20d6fe39e3 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -361,10 +361,12 @@ static LLCullResult* sCull = NULL; void validate_framebuffer_object(); - -bool addDeferredAttachments(LLRenderTarget& target) +// Add color attachments for deferred rendering +// target -- RenderTarget to add attachments to +// 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(GL_SRGB8_ALPHA8) && //specular + return target.addColorAttachment(for_impostor ? GL_RGBA : GL_SRGB8_ALPHA8) && //specular target.addColorAttachment(GL_RGB10_A2); //normal+z } @@ -10974,14 +10976,11 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar, bool preview_avatar) if (!avatar->mImpostor.isComplete()) { + avatar->mImpostor.allocate(resX, resY, GL_RGBA, TRUE, FALSE); + if (LLPipeline::sRenderDeferred) { - avatar->mImpostor.allocate(resX,resY,GL_SRGB8_ALPHA8,TRUE,FALSE); - addDeferredAttachments(avatar->mImpostor); - } - else - { - avatar->mImpostor.allocate(resX,resY,GL_RGBA,TRUE,FALSE); + addDeferredAttachments(avatar->mImpostor, true); } gGL.getTexUnit(0)->bind(&avatar->mImpostor); |