diff options
author | Dave Parks <davep@lindenlab.com> | 2022-09-06 15:07:22 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-09-06 15:07:22 -0500 |
commit | abf788175c451046f82cc9aeaddc894c47863ffa (patch) | |
tree | 54138d2f36281e782bfad0f84f460c2a94be4da2 | |
parent | ef2eecca2737a3c9d71ef4097c76d2dd0f52df3d (diff) |
SL-18096 WIP -- partial support for double sided rendering. Shadow map and picking support TBD.
-rw-r--r-- | indra/llcommon/llworkerthread.cpp | 1 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/pbropaqueF.glsl | 2 | ||||
-rw-r--r-- | indra/newview/lldrawpoolpbropaque.cpp | 2 |
3 files changed, 5 insertions, 0 deletions
diff --git a/indra/llcommon/llworkerthread.cpp b/indra/llcommon/llworkerthread.cpp index 02ce4823b8..bd2eb2089c 100644 --- a/indra/llcommon/llworkerthread.cpp +++ b/indra/llcommon/llworkerthread.cpp @@ -97,6 +97,7 @@ S32 LLWorkerThread::update(F32 max_time_ms) { if (worker->getFlags(LLWorkerClass::WCF_WORK_FINISHED)) { + worker->setFlags(LLWorkerClass::WCF_DELETE_REQUESTED); delete_list.push_back(worker); mDeleteList.erase(curiter); } diff --git a/indra/newview/app_settings/shaders/class1/deferred/pbropaqueF.glsl b/indra/newview/app_settings/shaders/class1/deferred/pbropaqueF.glsl index 7a13abc7e8..f5b5698305 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/pbropaqueF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/pbropaqueF.glsl @@ -153,6 +153,8 @@ void main() col.rgb = vary_position.xyz; #endif + tnorm *= gl_FrontFacing ? 1.0 : -1.0; + // See: C++: addDeferredAttachments(), GLSL: softenLightF frag_data[0] = vec4(col, 0.0); // Diffuse frag_data[1] = vec4(emissive, vertex_color.a); // PBR sRGB Emissive diff --git a/indra/newview/lldrawpoolpbropaque.cpp b/indra/newview/lldrawpoolpbropaque.cpp index 9fc3d51cad..e1614904b4 100644 --- a/indra/newview/lldrawpoolpbropaque.cpp +++ b/indra/newview/lldrawpoolpbropaque.cpp @@ -146,6 +146,8 @@ void LLDrawPoolPBROpaque::renderDeferred(S32 pass) shader->uniform1f(LLShaderMgr::METALLIC_FACTOR, pparams->mGLTFMaterial->mMetallicFactor); shader->uniform3fv(LLShaderMgr::EMISSIVE_COLOR, 1, pparams->mGLTFMaterial->mEmissiveColor.mV); + LLGLDisable cull_face(mat->mDoubleSided ? GL_CULL_FACE : 0); + if (rigged) { if (pparams->mAvatar.notNull() && (lastAvatar != pparams->mAvatar || lastMeshId != pparams->mSkinInfo->mHash)) |