float bL = 116 * cbrtf(bY / Yn) - 16;
float bA = 500 * (cbrtf(bX / Xn) - cbrtf(bY / Yn));
float bB = 200 * (cbrtf(bY / Yn) - cbrtf(bZ / Zn));
- // euclidean distance
- return 100 * ((aL - bL) * (aL - bL) + (aA - bA) * (aA - bA) + (aB - bB) * (aB - bB));
+ // euclidean distance, but moving weight away from A and B
+ return 1000 * ((aL - bL) * (aL - bL) + (aA - bA) * (aA - bA) + (aB - bB) * (aB - bB));
}
inline int color_dist_normalmap(const color_t &a, const color_t &b)
echo >&3 "<tr><th>Picture</th>"
echo >&3 "<th>Original</th>"
echo >&3 "<th>nvcompress</th>"
- echo >&3 "<th>rand64-L*a*b*</th>"
- echo >&3 "<th>norand-L*a*b*</th>"
echo >&3 "<th>rand64-sRGB</th>"
echo >&3 "<th>norand-sRGB</th>"
echo >&3 "<th>rand64-YUV</th>"
nvcompress "$i".tga "$i".dds
html "$i".dds
- t "$i".tga "$i"-rand64-lab.dds ./s2tc -c LAB -r 64
- t "$i".tga "$i"-nogray-lab.dds ./s2tc -c LAB -r 0
t "$i".tga "$i"-rand64-srgb.dds ./s2tc -c SRGB -r 64
- t "$i".tga "$i"-nogray-srgb.dds ./s2tc -c SRGB -r 0
+ t "$i".tga "$i"-norand-srgb.dds ./s2tc -c SRGB -r 0
t "$i".tga "$i"-rand64-yuv.dds ./s2tc -c YUV -r 64
- t "$i".tga "$i"-nogray-yuv.dds ./s2tc -c YUV -r 0
+ t "$i".tga "$i"-norand-yuv.dds ./s2tc -c YUV -r 0
t "$i".tga "$i"-rand64.dds ./s2tc -c RGB -r 64
t "$i".tga "$i"-norand.dds ./s2tc -c RGB -r 0
t "$i".tga "$i"-rand64-avg.dds ./s2tc -c AVG -r 64
- t "$i".tga "$i"-nogray-avg.dds ./s2tc -c AVG -r 0
+ t "$i".tga "$i"-norand-avg.dds ./s2tc -c AVG -r 0
html_rowend
done