[ChunkBuilder] Fixed smooth lighting issues with torchlight.
This commit is contained in:
parent
64fe451741
commit
90ab911840
3
TODO
3
TODO
@ -14,12 +14,13 @@ TODO
|
||||
• DONE: A mix of pickaxe + axe recipes gives a pickaxe?!
|
||||
• DONE: Lighting doesn’t propagate between chunks
|
||||
• DONE: Pressing `Esc` key in `SettingsMenuState` should just quit the category, not the state
|
||||
• DONE: Chunks are sent too many times to client on login
|
||||
• TODO: Lighting issues
|
||||
◦ DONE: Sunlight doesn’t propagate correctly
|
||||
◦ DONE: When loading chunks with smooth lighting enabled, they have black borders
|
||||
◦ DONE: Flower lighting is weird
|
||||
◦ TODO: Trees should block light
|
||||
• TODO: Chunks are sent too many times to client on login
|
||||
• TODO: `ServerWorld::sendWorldData` is useless and should be replaced by `sendSpawnData`
|
||||
• TODO: Shapeless recipe code isn’t working
|
||||
• TODO: GUI scale issues
|
||||
◦ TODO: `HUD` doesn’t update when GUI scale is changed
|
||||
|
@ -183,11 +183,13 @@ void ChunkBuilder::addFace(u8 x, u8 y, u8 z, u8 i, const ClientChunk &chunk, con
|
||||
vertices[j].lightValue[0] = chunk.lightmap().getSunlight(
|
||||
surroundingBlockPos[0], surroundingBlockPos[1], surroundingBlockPos[2]);
|
||||
|
||||
if (Config::isTorchSmoothLightingEnabled)
|
||||
int torchlight = chunk.lightmap().getTorchlight(
|
||||
surroundingBlockPos[0], surroundingBlockPos[1], surroundingBlockPos[2]);
|
||||
|
||||
if (Config::isTorchSmoothLightingEnabled && torchlight == 0)
|
||||
vertices[j].lightValue[1] = getLightForVertex(Light::Torch, x, y, z, i, j, normal, chunk);
|
||||
else
|
||||
vertices[j].lightValue[1] = chunk.lightmap().getTorchlight(
|
||||
surroundingBlockPos[0], surroundingBlockPos[1], surroundingBlockPos[2]);
|
||||
vertices[j].lightValue[1] = torchlight;
|
||||
|
||||
if (Config::isAmbientOcclusionEnabled)
|
||||
vertices[j].ambientOcclusion = getAmbientOcclusion(x, y, z, i, j, chunk);
|
||||
|
Loading…
x
Reference in New Issue
Block a user