opengl: Fixed color range of terrain textures
This will lose precision, but is sufficient right now, and avoids bright textures (like snow) to be greyed.
This commit is contained in:
parent
252d7e7b87
commit
f9d0918bcb
2 changed files with 2 additions and 3 deletions
|
@ -98,8 +98,7 @@ bool OpenGLTerrainChunk::maintain() {
|
||||||
double x = _startx + factor * to_double(i);
|
double x = _startx + factor * to_double(i);
|
||||||
double z = _startz + factor * to_double(j);
|
double z = _startz + factor * to_double(j);
|
||||||
Color color = _renderer->getTexturesRenderer()->applyToTerrain(x, z).final_color;
|
Color color = _renderer->getTexturesRenderer()->applyToTerrain(x, z).final_color;
|
||||||
color.normalize();
|
new_image->setPixel(i, j, Color(color.r * 0.2, color.g * 0.2, color.b * 0.2).normalized().to32BitRGBA());
|
||||||
new_image->setPixel(i, j, color.to32BitRGBA());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ out vec4 final_color;
|
||||||
|
|
||||||
void main(void)
|
void main(void)
|
||||||
{
|
{
|
||||||
final_color = texture(groundTexture, texcoord);
|
final_color = vec4(texture(groundTexture, texcoord).rgb * 5.0, 1.0);
|
||||||
|
|
||||||
final_color = applyAerialPerspective(final_color);
|
final_color = applyAerialPerspective(final_color);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue