1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-28 05:34:47 +01:00

Increase hillshading contrast

This commit is contained in:
Martin Tůma 2024-03-01 00:37:58 +01:00
parent 8547a3310a
commit 20f1003ce6
2 changed files with 2 additions and 1 deletions

View File

@ -84,6 +84,7 @@ QImage HillShading::render(const Matrix &m, quint8 alpha, double z,
if (std::isnan(L))
pixel = 0;
else {
L = sqrt(L * 0.8 + 0.2);
quint8 val = (L < 0) ? 0 : L * alpha;
pixel = (alpha - val)<<24;
}

View File

@ -7,7 +7,7 @@
class HillShading
{
public:
static QImage render(const Matrix &m, quint8 alpha = 64, double z = 0.3,
static QImage render(const Matrix &m, quint8 alpha = 96, double z = 0.3,
double azimuth = 315, double elevation = 25);
};