From 891cfdf4a93b3851c21510daae06d6a6c9a3274c Mon Sep 17 00:00:00 2001 From: cola98765 Date: Thu, 17 Feb 2022 18:05:45 +0100 Subject: [PATCH] added squared color averaging to merge --- .../java/com/seibel/lod/core/util/DataPointUtil.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/seibel/lod/core/util/DataPointUtil.java b/src/main/java/com/seibel/lod/core/util/DataPointUtil.java index 6ee44faa9..f0979722a 100644 --- a/src/main/java/com/seibel/lod/core/util/DataPointUtil.java +++ b/src/main/java/com/seibel/lod/core/util/DataPointUtil.java @@ -623,10 +623,10 @@ public class DataPointUtil { numberOfChildren++; allVoid = false; - tempAlpha += getAlpha(data); - tempRed += getRed(data); - tempGreen += getGreen(data); - tempBlue += getBlue(data); + tempAlpha += getAlpha(data) * getAlpha(data); + tempRed += getRed(data) * getRed(data); + tempGreen += getGreen(data) * getGreen(data); + tempBlue += getBlue(data) * getBlue(data); tempLightBlock += getLightBlock(data); tempLightSky += getLightSky(data); } @@ -656,7 +656,7 @@ public class DataPointUtil //{ // add simplification at the end due to color //} - dataPoint[j] = createDataPoint(tempAlpha, tempRed, tempGreen, tempBlue, height, depth, tempLightSky, tempLightBlock, genMode, false); + dataPoint[j] = createDataPoint((int) Math.sqrt(tempAlpha), (int) Math.sqrt(tempRed), (int) Math.sqrt(tempGreen), (int) Math.sqrt(tempBlue), height, depth, tempLightSky, tempLightBlock, genMode, false); } } }