aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-04-21 18:44:04 +0100
committerJustin Clark-Casey (justincc)2011-04-21 18:44:04 +0100
commit44999dce76182c0006f9a1de4d6c9c1b928830b0 (patch)
treeaba0d9f116b287028fdcf26d04666ee1a31a7874 /OpenSim/Region
parentAlter uuid gather so that it properly analyzes coalesced objects. (diff)
parentfix meshing failure on sculpt maps smaller than 64x64 (diff)
downloadopensim-SC_OLD-44999dce76182c0006f9a1de4d6c9c1b928830b0.zip
opensim-SC_OLD-44999dce76182c0006f9a1de4d6c9c1b928830b0.tar.gz
opensim-SC_OLD-44999dce76182c0006f9a1de4d6c9c1b928830b0.tar.bz2
opensim-SC_OLD-44999dce76182c0006f9a1de4d6c9c1b928830b0.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Physics/Meshing/SculptMap.cs13
1 files changed, 10 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/Meshing/SculptMap.cs b/OpenSim/Region/Physics/Meshing/SculptMap.cs
index d2d71de..740424e 100644
--- a/OpenSim/Region/Physics/Meshing/SculptMap.cs
+++ b/OpenSim/Region/Physics/Meshing/SculptMap.cs
@@ -62,6 +62,8 @@ namespace PrimMesher
62 62
63 bool needsScaling = false; 63 bool needsScaling = false;
64 64
65 bool smallMap = bmW * bmH <= lod * lod;
66
65 width = bmW; 67 width = bmW;
66 height = bmH; 68 height = bmH;
67 while (width * height > numLodPixels) 69 while (width * height > numLodPixels)
@@ -104,9 +106,14 @@ namespace PrimMesher
104 { 106 {
105 for (int x = 0; x <= width; x++) 107 for (int x = 0; x <= width; x++)
106 { 108 {
107 int bmY = y < height ? y * 2 : y * 2 - 1; 109 Color c;
108 int bmX = x < width ? x * 2 : x * 2 - 1; 110
109 Color c = bm.GetPixel(bmX, bmY); 111 if (smallMap)
112 c = bm.GetPixel(x < width ? x : x - 1,
113 y < height ? y : y - 1);
114 else
115 c = bm.GetPixel(x < width ? x * 2 : x * 2 - 1,
116 y < height ? y * 2 : y * 2 - 1);
110 117
111 redBytes[byteNdx] = c.R; 118 redBytes[byteNdx] = c.R;
112 greenBytes[byteNdx] = c.G; 119 greenBytes[byteNdx] = c.G;