back to octagonal lightspreading and one more failed test

This commit is contained in:
minjaesong
2020-02-28 05:39:46 +09:00
parent c4521b9fd9
commit bac2190104
3 changed files with 49 additions and 64 deletions

View File

@@ -65,6 +65,13 @@ class BlockProp {
BlockCodex[BlockCodex.dynamicToVirtualMap[id]!! - offset]._lumCol
}
fun getLumCol(x: Int, y: Int, channel: Int): Float = if (dynamicLuminosityFunction == 0) {
baseLumCol.getElem(channel)
} else {
val offset = XXHash32.hash(((x and 0xFFFF).shl(16) or (y and 0xFFFF)).toLittle(), 10000).fmod(BlockCodex.DYNAMIC_RANDOM_CASES)
BlockCodex[BlockCodex.dynamicToVirtualMap[id]!! - offset]._lumCol.getElem(channel)
}
/**
* @param luminosity
*/