From f836e36c49fa515367adb64f06bb541ed293c229 Mon Sep 17 00:00:00 2001 From: Dahlia Trimble Date: Sun, 4 Jan 2009 18:36:13 +0000 Subject: [PATCH] Improve LOD scaling for anisotropic sculpted prim meshes --- OpenSim/Region/Physics/Meshing/SculptMesh.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Physics/Meshing/SculptMesh.cs b/OpenSim/Region/Physics/Meshing/SculptMesh.cs index 826030bad2..9a5a776fd5 100644 --- a/OpenSim/Region/Physics/Meshing/SculptMesh.cs +++ b/OpenSim/Region/Physics/Meshing/SculptMesh.cs @@ -91,7 +91,8 @@ namespace PrimMesher normals = new List(); uvs = new List(); - float sourceScaleFactor = (float)lod / (float)Math.Max(sculptBitmap.Width, sculptBitmap.Height); + //float sourceScaleFactor = (float)lod / (float)Math.Max(sculptBitmap.Width, sculptBitmap.Height); + float sourceScaleFactor = (float)(lod * lod) / (float)(sculptBitmap.Width * sculptBitmap.Height); bool scaleSourceImage = sourceScaleFactor < 1.0f ? true : false; Bitmap bitmap;