• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Automap (client) [VS plugin mod]


Commit MetaInfo

Revisãoa2045b2075fdfc9b50d6f6ae2bd7a227a6ea1832 (tree)
Hora2021-05-30 06:09:21
Autormelchior <melchior@user...>
Commitermelchior

Mensagem de Log

Tweaked slope shading

Mudança Sumário

Diff

--- a/Automap/Renderers/StandardRenderer.cs
+++ b/Automap/Renderers/StandardRenderer.cs
@@ -126,10 +126,7 @@ namespace Automap
126126 }
127127 } else missingRainmap++;
128128 }
129-
130- ushort avgOverlap_Y = ( ushort )overlapHeightmap.OfType<ushort>( ).Average((ushort sel) => sel == 0 ? targetColMeta.YMax : sel);
131- //TODO: Row - then - Column averaging at Edges?
132-
129+
133130 #if DEBUG
134131 var badHeightData = overlapHeightmap.OfType<ushort>( ).Count((ushort arg) => arg == 0);
135132
@@ -158,7 +155,7 @@ namespace Automap
158155 continue;
159156 }
160157
161- float slopeBoost = 1f;
158+ float slopeBoost = 0.95f;
162159 int northH, northWestH, westH;
163160
164161 int north_X = localX + 1;
@@ -169,12 +166,12 @@ namespace Automap
169166 int northWest_Z = localZ;
170167 bool edge = localX == 0 || localZ == 0;
171168
172- northH = Math.Sign(localY - (overlapHeightmap[north_X, north_Z] == 0 ? localY : overlapHeightmap[north_X, north_Z]));
173- northWestH = Math.Sign(localY - (overlapHeightmap[northWest_X, northWest_Z] == 0 ? localY : overlapHeightmap[northWest_X, northWest_Z]));
174- westH = Math.Sign(localY - (overlapHeightmap[west_X, west_Z] == 0 ? localY : overlapHeightmap[west_X, west_Z]));
169+ northH = Math.Sign(localY - (overlapHeightmap[north_X, north_Z] <= 1 ? localY : overlapHeightmap[north_X, north_Z]));
170+ northWestH = Math.Sign(localY - (overlapHeightmap[northWest_X, northWest_Z] <= 1 ? localY : overlapHeightmap[northWest_X, northWest_Z]));
171+ westH = Math.Sign(localY - (overlapHeightmap[west_X, west_Z] <= 1 ? localY : overlapHeightmap[west_X, west_Z]));
175172
176173 float slopeness = (northH + northWestH + westH);
177- float tolerance = edge ? 2.0f : 0f;
174+ float tolerance = edge ? 1.0f : 0f;
178175
179176
180177 if (slopeness > tolerance) slopeBoost = 1.2f;