Skip to content

Commit 1dccee5

Browse files
committed
Fix voxel remap getting drawn 2x brighter than intended
1 parent cd5afee commit 1dccee5

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/TSMapEditor/Constants.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace TSMapEditor
55
{
66
public static class Constants
77
{
8-
public const string ReleaseVersion = "1.4.8";
8+
public const string ReleaseVersion = "1.4.9";
99

1010
public static int CellSizeX = 48;
1111
public static int CellSizeY = 24;

src/TSMapEditor/Rendering/ObjectRenderers/ObjectRenderer.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,9 @@ protected void DrawVoxelModel(T gameObject, VoxelModel model, byte facing, RampT
475475

476476
remapColor = ScaleColorToAmbient(remapColor, mapCell.CellLighting);
477477

478+
// Shader scales lighting by 2x
479+
remapColor = new Color(remapColor.R / 2, remapColor.G / 2, remapColor.B / 2, remapColor.A);
480+
478481
RenderFrame(gameObject, frame, remapFrame, color, drawRemap, remapColor,
479482
drawingBounds, null, lighting, depthAddition, 0.5f, compensateForBottomGap);
480483
}
@@ -517,7 +520,6 @@ private void RenderFrame(T gameObject, PositionedTexture frame, PositionedTextur
517520
(remapColor.B / 255.0f),
518521
textureWidthCenterPoint);
519522

520-
// RenderDependencies.PalettedColorDrawEffect.Parameters["UseRemap"].SetValue(true);
521523
RenderDependencies.ObjectSpriteRecord.AddGraphicsEntry(new ObjectSpriteEntry(paletteTexture, remapFrame.Texture, drawingBounds, remapColor, true, false, depthAddition));
522524
}
523525
}

0 commit comments

Comments
 (0)