mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-03-06 01:54:51 +01:00
Block: don't use lighting
This commit is contained in:
parent
22bc6db52a
commit
8bbc75d42f
1 changed files with 3 additions and 6 deletions
|
@ -44,14 +44,11 @@ uint32_t Block::getColor() const {
|
||||||
unsigned g = uint8_t(color >> 8);
|
unsigned g = uint8_t(color >> 8);
|
||||||
unsigned b = uint8_t(color);
|
unsigned b = uint8_t(color);
|
||||||
|
|
||||||
uint8_t light = (blockLight > skyLight) ? blockLight : skyLight;
|
|
||||||
|
|
||||||
float lightCoef = light/30.0f + 0.5f;
|
|
||||||
float heightCoef = height/255.0f + 0.5f;
|
float heightCoef = height/255.0f + 0.5f;
|
||||||
|
|
||||||
r *= lightCoef * heightCoef;
|
r *= heightCoef;
|
||||||
g *= lightCoef * heightCoef;
|
g *= heightCoef;
|
||||||
b *= lightCoef * heightCoef;
|
b *= heightCoef;
|
||||||
|
|
||||||
if (t.green) {
|
if (t.green) {
|
||||||
const Resource::Biome &biomeDef = Resource::BIOMES[biome];
|
const Resource::Biome &biomeDef = Resource::BIOMES[biome];
|
||||||
|
|
Loading…
Add table
Reference in a new issue