From eb5b0f2542c16aaac2283d4050a4cc2a3c6691f8 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Thu, 4 Mar 2010 15:30:15 -0600 Subject: Optimiziation pass. Added RenderUseStreamVBO to enable/disable usage of VBO's for streaming buffers. Faster traversal of LLCullResult members. Removal of llpushcallstacks from inner loops. Sprinkling in fast timers. --- indra/newview/llface.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview/llface.cpp') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 9de69a8173..8d86070bdf 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -862,12 +862,14 @@ void LLFace::updateRebuildFlags() } } +static LLFastTimer::DeclareTimer FTM_FACE_GET_GEOM("Face Geom"); + BOOL LLFace::getGeometryVolume(const LLVolume& volume, const S32 &f, const LLMatrix4& mat_vert, const LLMatrix3& mat_normal, const U16 &index_offset) { - llpushcallstacks ; + LLFastTimer t(FTM_FACE_GET_GEOM); const LLVolumeFace &vf = volume.getVolumeFace(f); S32 num_vertices = (S32)vf.mVertices.size(); S32 num_indices = LLPipeline::sUseTriStrips ? (S32)vf.mTriStrip.size() : (S32) vf.mIndices.size(); -- cgit v1.2.3 From 9e51aa3fd6d50181e78c42321ab90eda5761ff01 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Mon, 26 Apr 2010 14:42:06 +0100 Subject: EXT-7060 default auto alpha masking to ON for deferred rendering (only deferred rendering) (transplanted from 050ae2c9451a6b89374c5a10403f373e2475f23b) --- indra/newview/llface.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'indra/newview/llface.cpp') diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 8d86070bdf..f6932b0e68 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -862,6 +862,26 @@ void LLFace::updateRebuildFlags() } } + +bool LLFace::canRenderAsMask() +{ + const LLTextureEntry* te = getTextureEntry(); + return ( + ( + (LLPipeline::sRenderDeferred && LLPipeline::sAutoMaskAlphaDeferred) || + + (!LLPipeline::sRenderDeferred && LLPipeline::sAutoMaskAlphaNonDeferred) + ) // do we want masks at all? + && + (te->getColor().mV[3] == 1.0f) && // can't treat as mask if we have face alpha + !(LLPipeline::sRenderDeferred && te->getFullbright()) && // hack: alpha masking renders fullbright faces invisible in deferred rendering mode, need to figure out why - for now, avoid + (te->getGlow() == 0.f) && // glowing masks are hard to implement - don't mask + + getTexture()->getIsAlphaMask() // texture actually qualifies for masking (lazily recalculated but expensive) + ); +} + + static LLFastTimer::DeclareTimer FTM_FACE_GET_GEOM("Face Geom"); BOOL LLFace::getGeometryVolume(const LLVolume& volume, -- cgit v1.2.3