Use LLStaticHashedString for faster uniform lookup.
This commit is contained in:
@@ -1370,9 +1370,14 @@ void LLBumpImageList::onSourceLoaded( BOOL success, LLViewerTexture *src_vi, LLI
|
||||
LLGLDisable blend(GL_BLEND);
|
||||
gGL.setColorMask(TRUE, TRUE);
|
||||
gNormalMapGenProgram.bind();
|
||||
gNormalMapGenProgram.uniform1f("norm_scale", gSavedSettings.getF32("RenderNormalMapScale"));
|
||||
gNormalMapGenProgram.uniform1f("stepX", 1.f/bump->getWidth());
|
||||
gNormalMapGenProgram.uniform1f("stepY", 1.f/bump->getHeight());
|
||||
|
||||
static LLStaticHashedString sNormScale("norm_scale");
|
||||
static LLStaticHashedString sStepX("stepX");
|
||||
static LLStaticHashedString sStepY("stepY");
|
||||
|
||||
gNormalMapGenProgram.uniform1f(sNormScale, gSavedSettings.getF32("RenderNormalMapScale"));
|
||||
gNormalMapGenProgram.uniform1f(sStepX, 1.f/bump->getWidth());
|
||||
gNormalMapGenProgram.uniform1f(sStepX, 1.f/bump->getHeight());
|
||||
|
||||
LLVector2 v((F32) bump->getWidth()/gPipeline.mScreen.getWidth(),
|
||||
(F32) bump->getHeight()/gPipeline.mScreen.getHeight());
|
||||
|
||||
Reference in New Issue
Block a user