diff options
| author | Dave Parks <davep@lindenlab.com> | 2023-03-10 13:33:36 -0600 | 
|---|---|---|
| committer | Dave Parks <davep@lindenlab.com> | 2023-03-10 13:33:36 -0600 | 
| commit | bd4b03de8b73ecb888f8e3111bada7c643f7fcfd (patch) | |
| tree | 9dd850ea81bc6aa280fac2262d2f8657856422c4 | |
| parent | 2db036ba1758d36c28b9a7e5c32f732787ff8c44 (diff) | |
DRTVWR-559 Fix for assert in LLVertexBuffer, incidental decruft.
| -rw-r--r-- | indra/llrender/llvertexbuffer.cpp | 3 | ||||
| -rw-r--r-- | indra/newview/llappviewer.cpp | 3 | ||||
| -rw-r--r-- | indra/newview/llface.cpp | 30 | ||||
| -rw-r--r-- | indra/newview/llspatialpartition.cpp | 4 | ||||
| -rw-r--r-- | indra/newview/llviewerstats.cpp | 7 | ||||
| -rw-r--r-- | indra/newview/llvovolume.cpp | 52 | ||||
| -rw-r--r-- | indra/newview/pipeline.cpp | 172 | ||||
| -rw-r--r-- | indra/newview/pipeline.h | 3 | 
8 files changed, 106 insertions, 168 deletions
| diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index cf4964169a..dd0ea0096c 100644 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -1357,7 +1357,8 @@ void LLVertexBuffer::setBuffer()      // this Vertex Buffer must provide all necessary attributes for currently bound shader      llassert_msg((data_mask & mTypeMask) == data_mask, -        "Attribute mask mismatch! mTypeMask should be a superset of data_mask.  data_mask: 0x" << std::hex << data_mask << " mTypeMask: 0x" << mTypeMask << std::dec); +        "Attribute mask mismatch! mTypeMask should be a superset of data_mask.  data_mask: 0x"  +                << std::hex << data_mask << " mTypeMask: 0x" << mTypeMask << " Missing: 0x" << (data_mask & ~mTypeMask) <<  std::dec);      if (sGLRenderBuffer != mGLBuffer)      { diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 061feba0a4..7731f37c94 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -572,8 +572,7 @@ static void settings_to_globals()  static void settings_modify()  {      LLPipeline::sRenderTransparentWater = gSavedSettings.getBOOL("RenderTransparentWater"); -    LLPipeline::sRenderBump = TRUE; // FALSE is deprecated --  gSavedSettings.getBOOL("RenderObjectBump"); -    LLPipeline::sRenderDeferred = TRUE; // FALSE is deprecated --  LLPipeline::sRenderBump&& gSavedSettings.getBOOL("RenderDeferred"); +    LLPipeline::sRenderDeferred = TRUE; // FALSE is deprecated      LLRenderTarget::sUseFBO             = LLPipeline::sRenderDeferred;      LLVOSurfacePatch::sLODFactor        = gSavedSettings.getF32("RenderTerrainLODFactor");      LLVOSurfacePatch::sLODFactor *= LLVOSurfacePatch::sLODFactor; //square lod factor to get exponential range of [1,4] diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 1ae13e06f5..d7e4632ab0 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -1107,20 +1107,13 @@ bool LLFace::canRenderAsMask()  		(te->getGlow() == 0.f) && // glowing masks are hard to implement - don't mask  		getTexture()->getIsAlphaMask()) // texture actually qualifies for masking (lazily recalculated but expensive)  	{ -		if (LLPipeline::sRenderDeferred) -		{ -			if (getViewerObject()->isHUDAttachment() || te->getFullbright()) -			{ //hud attachments and fullbright objects are NOT subject to the deferred rendering pipe -				return LLPipeline::sAutoMaskAlphaNonDeferred; -			} -			else -			{ -				return LLPipeline::sAutoMaskAlphaDeferred; -			} +		if (getViewerObject()->isHUDAttachment() || te->getFullbright()) +		{ //hud attachments and fullbright objects are NOT subject to the deferred rendering pipe +			return LLPipeline::sAutoMaskAlphaNonDeferred;  		}  		else  		{ -			return LLPipeline::sAutoMaskAlphaNonDeferred; +			return LLPipeline::sAutoMaskAlphaDeferred;  		}  	} @@ -1260,19 +1253,10 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,  			bool shiny_in_alpha = false; -			if (LLPipeline::sRenderDeferred) -			{ //store shiny in alpha if we don't have a specular map -				if  (!mat || mat->getSpecularID().isNull()) -				{ -					shiny_in_alpha = true; -				} -			} -			else +			//store shiny in alpha if we don't have a specular map +			if  (!mat || mat->getSpecularID().isNull())  			{ -				if (!mat || mat->getDiffuseAlphaMode() != LLMaterial::DIFFUSE_ALPHA_MODE_MASK) -				{ -					shiny_in_alpha = true; -				} +				shiny_in_alpha = true;  			}  			if (shiny_in_alpha) diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index d81d7ab674..92fccfcfd6 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -3105,7 +3105,8 @@ static void setTextureAreaDebugText(LLDrawable* drawablep)          {              std::ostringstream str; -            for (S32 i = 0; i < vobjp->getNumTEs(); ++i) +            //for (S32 i = 0; i < vobjp->getNumTEs(); ++i) +            S32 i = 0;              {                  if (i < drawablep->getNumFaces())                  { @@ -3139,7 +3140,6 @@ static void setTextureAreaDebugText(LLDrawable* drawablep)                      vobjp->setDebugText(str.str());                  } -                break;              }          }          else diff --git a/indra/newview/llviewerstats.cpp b/indra/newview/llviewerstats.cpp index ee39b7d02f..b1abd0a656 100644 --- a/indra/newview/llviewerstats.cpp +++ b/indra/newview/llviewerstats.cpp @@ -570,14 +570,11 @@ void send_viewer_stats(bool include_preferences)  			shader_level = 3;  		}  	} -	else if (gPipeline.canUseWindLightShadersOnObjects()) +	else  	{  		shader_level = 2;  	} -	else if (gPipeline.shadersLoaded()) -	{ -		shader_level = 1; -	} +	  	system["shader_level"] = shader_level; diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 49939cbbf0..d1f4fa1c7a 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -5469,7 +5469,8 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,      llassert(type != LLPipeline::RENDER_TYPE_PASS_GLTF_PBR_RIGGED || info->mGLTFMaterial != nullptr);      llassert(type != LLPipeline::RENDER_TYPE_PASS_GLTF_PBR_ALPHA_MASK || info->mGLTFMaterial != nullptr);      llassert(type != LLPipeline::RENDER_TYPE_PASS_GLTF_PBR_ALPHA_MASK_RIGGED || info->mGLTFMaterial != nullptr); - +     +    llassert(type != LLRenderPass::PASS_BUMP || (info->mVertexBuffer->getTypeMask() & LLVertexBuffer::MAP_TANGENT) != 0);      llassert(type != LLRenderPass::PASS_NORMSPEC || info->mNormalMap.notNull());  } @@ -5742,7 +5743,6 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)  			rigged = rigged || (vobj->isAnimatedObject() && vobj->isRiggedMesh() &&                  vobj->getControlAvatar() && vobj->getControlAvatar()->mPlaying); -			bool bake_sunlight = LLPipeline::sBakeSunlight && drawablep->isStatic();  			bool any_rigged_face = false;  			//for each face @@ -5900,13 +5900,10 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)  							facep->mLastUpdateTime = gFrameTimeSeconds;  						} -						if (gPipeline.canUseWindLightShadersOnObjects() -							&& LLPipeline::sRenderBump)  						{                              LLGLTFMaterial* gltf_mat = te->getGLTFRenderMaterial(); -							if (LLPipeline::sRenderDeferred &&  -                                (gltf_mat != nullptr || (te->getMaterialParams().notNull()  && !te->getMaterialID().isNull()))) +							if (gltf_mat != nullptr || (te->getMaterialParams().notNull()  && !te->getMaterialID().isNull()))  							{                                  if (gltf_mat != nullptr)                                  { @@ -5915,7 +5912,8 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)                                  else                                  {                                      LLMaterial* mat = te->getMaterialParams().get(); -                                    if (mat->getNormalID().notNull()) +                                    if (mat->getNormalID().notNull() || // <-- has a normal map, needs tangents +                                        (te->getBumpmap() && (te->getBumpmap() < 18))) // <-- has an emboss bump map, needs tangents                                      {                                          if (mat->getSpecularID().notNull())                                          { //has normal and specular maps (needs texcoord1, texcoord2, and tangent) @@ -5950,23 +5948,6 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)                                  add_face(sFullbrightFaces, fullbright_count, facep);  							}  						} -						else -						{ -							if (te->getBumpmap() && LLPipeline::sRenderBump) -							{ //needs normal + tangent -                                add_face(sBumpFaces, bump_count, facep); -							} -							else if ((te->getShiny() && LLPipeline::sRenderBump) || -								!(te->getFullbright() || bake_sunlight)) -							{ //needs normal -                                add_face(sSimpleFaces, simple_count, facep); -							} -							else  -							{ //doesn't need normal -								facep->setState(LLFace::FULLBRIGHT); -                                add_face(sFullbrightFaces, fullbright_count, facep); -							} -						}  					}  				}  				else @@ -6194,7 +6175,7 @@ struct CompareBatchBreaker  		{  			return lte->getFullbright() < rte->getFullbright();  		} -        else if (LLPipeline::sRenderDeferred && lte->getMaterialID() != rte->getMaterialID()) +        else if (lte->getMaterialID() != rte->getMaterialID())          {              return lte->getMaterialID() < rte->getMaterialID();          } @@ -6285,13 +6266,9 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace  		texture_index_channels = LLGLSLShader::sIndexedTextureChannels-1; //always reserve one for shiny for now just for simplicity;  	} -	if (LLPipeline::sRenderDeferred && distance_sort) +	if (distance_sort)  	{  		texture_index_channels = gDeferredAlphaProgram.mFeatures.mIndexedTextureChannels; -	} -     -    if (distance_sort) -    {          buffer_index = -1;      } @@ -6647,6 +6624,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace  				}  				else if (use_legacy_bump)  				{ +                    llassert(mask & LLVertexBuffer::MAP_TANGENT);  					// we have a material AND legacy bump settings, but no normal map  					registerFace(group, facep, LLRenderPass::PASS_BUMP);  				} @@ -6706,7 +6684,6 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace  					registerFace(group, facep, LLRenderPass::PASS_ALPHA);  				}  				else if (gPipeline.shadersLoaded() -					&& LLPipeline::sRenderBump   					&& te->getShiny()   					&& can_be_shiny)  				{ @@ -6741,7 +6718,6 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace  				}  			}  			else if (gPipeline.shadersLoaded() -				&& LLPipeline::sRenderBump   				&& te->getShiny()   				&& can_be_shiny)  			{ //shiny @@ -6762,6 +6738,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace  					}  					else if (use_legacy_bump)  					{ //register in deferred bump pass +                        llassert(mask& LLVertexBuffer::MAP_TANGENT);  						registerFace(group, facep, LLRenderPass::PASS_BUMP);  					}  					else @@ -6795,15 +6772,16 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace  					{  						registerFace(group, facep, LLRenderPass::PASS_FULLBRIGHT);  					} -					if (!hud_group && LLPipeline::sRenderBump && use_legacy_bump) +					if (!hud_group && use_legacy_bump)  					{ //if this is the deferred render and a bump map is present, register in post deferred bump  						registerFace(group, facep, LLRenderPass::PASS_POST_BUMP);  					}  				}  				else  				{ -					if (LLPipeline::sRenderDeferred && LLPipeline::sRenderBump && use_legacy_bump) +					if (use_legacy_bump)  					{ //non-shiny or fullbright deferred bump +                        llassert(mask& LLVertexBuffer::MAP_TANGENT);  						registerFace(group, facep, LLRenderPass::PASS_BUMP);  					}  					else @@ -6823,8 +6801,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace  				if (!gPipeline.shadersLoaded() &&   					!is_alpha &&  -					te->getShiny() &&  -					LLPipeline::sRenderBump) +					te->getShiny())  				{ //shiny as an extra pass when shaders are disabled  					registerFace(group, facep, LLRenderPass::PASS_SHINY);  				} @@ -6836,8 +6813,9 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace  				llassert((mask & LLVertexBuffer::MAP_NORMAL) || fullbright);  				facep->setPoolType((fullbright) ? LLDrawPool::POOL_FULLBRIGHT : LLDrawPool::POOL_SIMPLE); -				if (!force_simple && LLPipeline::sRenderBump && use_legacy_bump) +				if (!force_simple && use_legacy_bump)  				{ +                    llassert(mask & LLVertexBuffer::MAP_TANGENT);  					registerFace(group, facep, LLRenderPass::PASS_BUMP);  				}  			} diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index b053af3f96..ffb314c013 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -308,7 +308,6 @@ bool	LLPipeline::sDelayVBUpdate = true;  bool	LLPipeline::sAutoMaskAlphaDeferred = true;  bool	LLPipeline::sAutoMaskAlphaNonDeferred = false;  bool	LLPipeline::sRenderTransparentWater = true; -bool	LLPipeline::sRenderBump = true;  bool	LLPipeline::sBakeSunlight = false;  bool	LLPipeline::sNoAlpha = false;  bool	LLPipeline::sUseFarClip = true; @@ -400,7 +399,6 @@ void LLPipeline::init()  	gOctreeMaxCapacity = gSavedSettings.getU32("OctreeMaxNodeCapacity");  	gOctreeMinSize = gSavedSettings.getF32("OctreeMinimumNodeSize");  	sDynamicLOD = gSavedSettings.getBOOL("RenderDynamicLOD"); -    sRenderBump = TRUE; // DEPRECATED -- gSavedSettings.getBOOL("RenderObjectBump");  	sRenderAttachedLights = gSavedSettings.getBOOL("RenderAttachedLights");  	sRenderAttachedParticles = gSavedSettings.getBOOL("RenderAttachedParticles"); @@ -968,12 +966,6 @@ void LLPipeline::updateRenderTransparentWater()      sRenderTransparentWater = gSavedSettings.getBOOL("RenderTransparentWater");  } -//static -void LLPipeline::updateRenderBump() -{ -    sRenderBump = TRUE; // DEPRECATED -- gSavedSettings.getBOOL("RenderObjectBump"); -} -  // static  void LLPipeline::refreshCachedSettings()  { @@ -1183,46 +1175,44 @@ void LLPipeline::createGLBuffers()      mRT->width = 0;      mRT->height = 0; -    if (sRenderDeferred) -    { -		if (!mNoiseMap) -		{ -			const U32 noiseRes = 128; -			LLVector3 noise[noiseRes*noiseRes]; +     +	if (!mNoiseMap) +	{ +		const U32 noiseRes = 128; +		LLVector3 noise[noiseRes*noiseRes]; -			F32 scaler = gSavedSettings.getF32("RenderDeferredNoise")/100.f; -			for (U32 i = 0; i < noiseRes*noiseRes; ++i) -			{ -				noise[i] = LLVector3(ll_frand()-0.5f, ll_frand()-0.5f, 0.f); -				noise[i].normVec(); -				noise[i].mV[2] = ll_frand()*scaler+1.f-scaler/2.f; -			} +		F32 scaler = gSavedSettings.getF32("RenderDeferredNoise")/100.f; +		for (U32 i = 0; i < noiseRes*noiseRes; ++i) +		{ +			noise[i] = LLVector3(ll_frand()-0.5f, ll_frand()-0.5f, 0.f); +			noise[i].normVec(); +			noise[i].mV[2] = ll_frand()*scaler+1.f-scaler/2.f; +		} -			LLImageGL::generateTextures(1, &mNoiseMap); +		LLImageGL::generateTextures(1, &mNoiseMap); -			gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mNoiseMap); -			LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_RGB16F, noiseRes, noiseRes, GL_RGB, GL_FLOAT, noise, false); -			gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT); -		} +		gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mNoiseMap); +		LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_RGB16F, noiseRes, noiseRes, GL_RGB, GL_FLOAT, noise, false); +		gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT); +	} -		if (!mTrueNoiseMap) +	if (!mTrueNoiseMap) +	{ +		const U32 noiseRes = 128; +		F32 noise[noiseRes*noiseRes*3]; +		for (U32 i = 0; i < noiseRes*noiseRes*3; i++)  		{ -			const U32 noiseRes = 128; -			F32 noise[noiseRes*noiseRes*3]; -			for (U32 i = 0; i < noiseRes*noiseRes*3; i++) -			{ -				noise[i] = ll_frand()*2.0-1.0; -			} - -			LLImageGL::generateTextures(1, &mTrueNoiseMap); -			gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mTrueNoiseMap); -			LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_RGB16F, noiseRes, noiseRes, GL_RGB,GL_FLOAT, noise, false); -			gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT); +			noise[i] = ll_frand()*2.0-1.0;  		} -		createLUTBuffers(); +		LLImageGL::generateTextures(1, &mTrueNoiseMap); +		gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mTrueNoiseMap); +		LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_RGB16F, noiseRes, noiseRes, GL_RGB,GL_FLOAT, noise, false); +		gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT);  	} +	createLUTBuffers(); +  	gBumpImageList.restoreGL();  } @@ -1233,70 +1223,67 @@ F32 lerpf(F32 a, F32 b, F32 w)  void LLPipeline::createLUTBuffers()  { -	if (sRenderDeferred) +	if (!mLightFunc)  	{ -		if (!mLightFunc) +		U32 lightResX = gSavedSettings.getU32("RenderSpecularResX"); +		U32 lightResY = gSavedSettings.getU32("RenderSpecularResY"); +		F32* ls = new F32[lightResX*lightResY]; +		F32 specExp = gSavedSettings.getF32("RenderSpecularExponent"); +        // Calculate the (normalized) blinn-phong specular lookup texture. (with a few tweaks) +		for (U32 y = 0; y < lightResY; ++y)  		{ -			U32 lightResX = gSavedSettings.getU32("RenderSpecularResX"); -			U32 lightResY = gSavedSettings.getU32("RenderSpecularResY"); -			F32* ls = new F32[lightResX*lightResY]; -			F32 specExp = gSavedSettings.getF32("RenderSpecularExponent"); -            // Calculate the (normalized) blinn-phong specular lookup texture. (with a few tweaks) -			for (U32 y = 0; y < lightResY; ++y) +			for (U32 x = 0; x < lightResX; ++x)  			{ -				for (U32 x = 0; x < lightResX; ++x) -				{ -					ls[y*lightResX+x] = 0; -					F32 sa = (F32) x/(lightResX-1); -					F32 spec = (F32) y/(lightResY-1); -					F32 n = spec * spec * specExp; +				ls[y*lightResX+x] = 0; +				F32 sa = (F32) x/(lightResX-1); +				F32 spec = (F32) y/(lightResY-1); +				F32 n = spec * spec * specExp; -					// Nothing special here.  Just your typical blinn-phong term. -					spec = powf(sa, n); +				// Nothing special here.  Just your typical blinn-phong term. +				spec = powf(sa, n); -					// Apply our normalization function. -					// Note: This is the full equation that applies the full normalization curve, not an approximation. -					// This is fine, given we only need to create our LUT once per buffer initialization. -					spec *= (((n + 2) * (n + 4)) / (8 * F_PI * (powf(2, -n/2) + n))); - -					// Since we use R16F, we no longer have a dynamic range issue we need to work around here. -					// Though some older drivers may not like this, newer drivers shouldn't have this problem. -					ls[y*lightResX+x] = spec; -				} +				// Apply our normalization function. +				// Note: This is the full equation that applies the full normalization curve, not an approximation. +				// This is fine, given we only need to create our LUT once per buffer initialization. +				spec *= (((n + 2) * (n + 4)) / (8 * F_PI * (powf(2, -n/2) + n))); + +				// Since we use R16F, we no longer have a dynamic range issue we need to work around here. +				// Though some older drivers may not like this, newer drivers shouldn't have this problem. +				ls[y*lightResX+x] = spec;  			} +		} -			U32 pix_format = GL_R16F; +		U32 pix_format = GL_R16F;  #if LL_DARWIN -			// Need to work around limited precision with 10.6.8 and older drivers -			// -			pix_format = GL_R32F; +		// Need to work around limited precision with 10.6.8 and older drivers +		// +		pix_format = GL_R32F;  #endif -			LLImageGL::generateTextures(1, &mLightFunc); -			gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mLightFunc); -			LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, pix_format, lightResX, lightResY, GL_RED, GL_FLOAT, ls, false); -			gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP); -			gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_TRILINEAR); -			glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); -			glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); +		LLImageGL::generateTextures(1, &mLightFunc); +		gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mLightFunc); +		LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, pix_format, lightResX, lightResY, GL_RED, GL_FLOAT, ls, false); +		gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP); +		gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_TRILINEAR); +		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); +		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); -			delete [] ls; -		} +		delete [] ls; +	} -        mPbrBrdfLut.allocate(512, 512, GL_RG16F); -        mPbrBrdfLut.bindTarget(); -        gDeferredGenBrdfLutProgram.bind(); +    mPbrBrdfLut.allocate(512, 512, GL_RG16F); +    mPbrBrdfLut.bindTarget(); +    gDeferredGenBrdfLutProgram.bind(); -        gGL.begin(LLRender::TRIANGLE_STRIP); -        gGL.vertex2f(-1, -1); -        gGL.vertex2f(-1, 1); -        gGL.vertex2f(1, -1); -        gGL.vertex2f(1, 1); -        gGL.end(); -        gGL.flush(); +    gGL.begin(LLRender::TRIANGLE_STRIP); +    gGL.vertex2f(-1, -1); +    gGL.vertex2f(-1, 1); +    gGL.vertex2f(1, -1); +    gGL.vertex2f(1, 1); +    gGL.end(); +    gGL.flush(); -        gDeferredGenBrdfLutProgram.unbind(); -        mPbrBrdfLut.flush(); -	} +    gDeferredGenBrdfLutProgram.unbind(); +    mPbrBrdfLut.flush();  } @@ -1331,11 +1318,6 @@ bool LLPipeline::canUseWindLightShaders() const      return true;  } -bool LLPipeline::canUseWindLightShadersOnObjects() const -{ -    return true; -} -  bool LLPipeline::canUseAntiAliasing() const  {  	return true; diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index 483fe08559..0faa0c3f20 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -224,7 +224,6 @@ public:  	bool		shadersLoaded();  	bool		canUseWindLightShaders() const; -	bool		canUseWindLightShadersOnObjects() const;  	bool		canUseAntiAliasing() const;  	// phases @@ -421,7 +420,6 @@ public:  	static void setRenderHighlightTextureChannel(LLRender::eTexIndex channel); // sets which UV setup to display in highlight overlay  	static void updateRenderTransparentWater(); -	static void updateRenderBump();  	static void refreshCachedSettings();  	void addDebugBlip(const LLVector3& position, const LLColor4& color); @@ -623,7 +621,6 @@ public:  	static bool				sAutoMaskAlphaDeferred;  	static bool				sAutoMaskAlphaNonDeferred;  	static bool				sRenderTransparentWater; -	static bool				sRenderBump;  	static bool				sBakeSunlight;  	static bool				sNoAlpha;  	static bool				sUseFarClip; | 
