summaryrefslogtreecommitdiff
path: root/src/SMAPI
diff options
context:
space:
mode:
authoratravita-mods <94934860+atravita-mods@users.noreply.github.com>2022-08-16 16:46:10 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-10-08 13:27:05 -0400
commit581763c36392e28ed6e05690ff84b66da5882e78 (patch)
tree2d40318f63e446bdd93e4e47bd59c46b74c818c0 /src/SMAPI
parent4a1055e573e9d8b0aa654238889596be07c29193 (diff)
downloadSMAPI-581763c36392e28ed6e05690ff84b66da5882e78.tar.gz
SMAPI-581763c36392e28ed6e05690ff84b66da5882e78.tar.bz2
SMAPI-581763c36392e28ed6e05690ff84b66da5882e78.zip
Skip math if above is fully opaque.
Diffstat (limited to 'src/SMAPI')
-rw-r--r--src/SMAPI/Framework/Content/AssetDataForImage.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/SMAPI/Framework/Content/AssetDataForImage.cs b/src/SMAPI/Framework/Content/AssetDataForImage.cs
index 46c2a22e..ea04f57a 100644
--- a/src/SMAPI/Framework/Content/AssetDataForImage.cs
+++ b/src/SMAPI/Framework/Content/AssetDataForImage.cs
@@ -160,13 +160,13 @@ namespace StardewModdingAPI.Framework.Content
// merge pixels
for (int i = 0; i < pixelCount; i++)
{
- ref Color above = ref sourceData[i];
- ref Color below = ref mergedData[i];
+ Color above = sourceData[i];
+ Color below = mergedData[i];
// shortcut transparency
if (above.A < MinOpacity)
continue;
- if (below.A < MinOpacity)
+ if (below.A < MinOpacity || above.A == byte.MaxValue)
mergedData[i] = above;
// merge pixels