From ae6a402b7a26aa4ec3258b3e0b68919602e03d23 Mon Sep 17 00:00:00 2001 From: Cosmic Linden Date: Wed, 15 May 2024 09:55:55 -0700 Subject: secondlife/viewer#1474: Remove small texture offset from PBR terrain --- indra/newview/lldrawpoolterrain.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'indra/newview/lldrawpoolterrain.cpp') diff --git a/indra/newview/lldrawpoolterrain.cpp b/indra/newview/lldrawpoolterrain.cpp index c5932a6ad9..b33a2dd9bb 100644 --- a/indra/newview/lldrawpoolterrain.cpp +++ b/indra/newview/lldrawpoolterrain.cpp @@ -431,18 +431,10 @@ void LLDrawPoolTerrain::renderFullShaderPBR(BOOL local_materials) LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr; llassert(shader); - - - // *TODO: Figure out why this offset is *sometimes* producing seams at the - // region edge, and repeat jumps when crossing regions, when - // RenderTerrainPBRScale is not a factor of the region scale. - LLVector3d region_origin_global = gAgent.getRegion()->getOriginGlobal(); - F32 offset_x = (F32)fmod(region_origin_global.mdV[VX], 1.0/(F64)sPBRDetailScale)*sPBRDetailScale; - F32 offset_y = (F32)fmod(region_origin_global.mdV[VY], 1.0/(F64)sPBRDetailScale)*sPBRDetailScale; LLGLTFMaterial::TextureTransform base_color_transform; base_color_transform.mScale = LLVector2(sPBRDetailScale, sPBRDetailScale); - base_color_transform.mOffset = LLVector2(offset_x, offset_y); + // *TODO: mOffset and mRotation left at defaults for now. (per-material texture transforms are implemented in another branch) F32 base_color_packed[8]; base_color_transform.getPacked(base_color_packed); // *HACK: Use the same texture repeats for all PBR terrain textures for now -- cgit v1.2.3