diff --git a/indra/llrender/llpostprocess.cpp b/indra/llrender/llpostprocess.cpp index 85fb1c29a..c0db66a5e 100644 --- a/indra/llrender/llpostprocess.cpp +++ b/indra/llrender/llpostprocess.cpp @@ -247,10 +247,6 @@ void LLPostProcess::applyColorFilterShader(void) gPostColorFilterProgram.uniform3fv("contrastBase", 1, LLVector3(baseR, baseG, baseB).mV); gPostColorFilterProgram.uniform1f("saturation", tweaks.getSaturation()); gPostColorFilterProgram.uniform3fv("lumWeights", 1, LLVector3(LUMINANCE_R, LUMINANCE_G, LUMINANCE_B).mV); - - LLGLEnable blend(GL_BLEND); - gGL.setSceneBlendType(LLRender::BT_REPLACE); - LLGLDepthTest depth(GL_FALSE); /// Draw a screen space quad drawOrthoQuad(QUAD_NORMAL); @@ -271,11 +267,7 @@ void LLPostProcess::applyNightVisionShader(void) gPostNightVisionProgram.uniform1f("noiseStrength", tweaks.getNoiseStrength()); mNoiseTextureScale = 0.001f + ((100.f - tweaks.getNoiseSize()) / 100.f); mNoiseTextureScale *= (mScreenHeight / NOISE_SIZE); - - LLGLEnable blend(GL_BLEND); - gGL.setSceneBlendType(LLRender::BT_REPLACE); - LLGLDepthTest depth(GL_FALSE); - + /// Draw a screen space quad drawOrthoQuad(QUAD_NOISE); gPostNightVisionProgram.unbind(); @@ -291,9 +283,6 @@ void LLPostProcess::applyGaussBlurShader(void) gGL.getTexUnit(0)->bind(mSceneRenderTexture); - LLGLEnable blend(GL_BLEND); - LLGLDepthTest depth(GL_FALSE); - gGL.setSceneBlendType(LLRender::BT_REPLACE); GLint horiz_pass = gPostGaussianBlurProgram.getUniformLocation("horizontalPass"); for(int i = 0;idisable(); checkError(); } diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index f4aa4305b..331a946ad 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -1225,7 +1225,8 @@ void render_ui(F32 zoom_factor, int subfield, bool tiling) /// and then display it again with compositor effects. /// Using render to texture would be faster/better, but I don't have a /// grasp of their full display stack just yet. - LLPostProcess::getInstance()->apply(gViewerWindow->getWindowDisplayWidth(), gViewerWindow->getWindowDisplayHeight()); + if(gPipeline.canUseVertexShaders()) + LLPostProcess::getInstance()->apply(gViewerWindow->getWindowDisplayWidth(), gViewerWindow->getWindowDisplayHeight()); render_hud_elements(); render_hud_attachments(); diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 627df591b..85751370c 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -178,7 +178,7 @@ LLViewerRegion* LLWorld::addRegion(const U64 ®ion_handle, const LLHost &host, U32 iindex = 0; U32 jindex = 0; - mWidth = region_size_x; //MegaRegion + mWidth = region_size_x; //MegaRegion mWidthInMeters = mWidth * mScale; //MegaRegion from_region_handle(region_handle, &iindex, &jindex); S32 x = (S32)(iindex/256); //MegaRegion @@ -1266,16 +1266,16 @@ void process_enable_simulator(LLMessageSystem *msg, void **user_data) // which simulator should we modify? LLHost sim(ip_u32, port); - U32 region_size_x = 256; - msg->getU32Fast(_PREHASH_SimulatorInfo, _PREHASH_RegionSizeX, region_size_x); - - U32 region_size_y = 256; - msg->getU32Fast(_PREHASH_SimulatorInfo, _PREHASH_RegionSizeY, region_size_y); - - if (region_size_y == 0 || region_size_x == 0) - { - region_size_x = 256; - region_size_y = 256; + U32 region_size_x = 256; + msg->getU32Fast(_PREHASH_SimulatorInfo, _PREHASH_RegionSizeX, region_size_x); + + U32 region_size_y = 256; + msg->getU32Fast(_PREHASH_SimulatorInfo, _PREHASH_RegionSizeY, region_size_y); + + if (region_size_y == 0 || region_size_x == 0) + { + region_size_x = 256; + region_size_y = 256; } // Viewer trusts the simulator.