Water tint
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { block_value, chunk_key, default_block_value } from "$/common/utils.ts";
|
||||
import { AIR_ID } from "$/common/protocol.ts";
|
||||
import { decode_level_chunk } from "$/common/chunk_streaming.ts";
|
||||
import { foliage_color, grass_color } from "$/common/worldgen/biome_colors.ts";
|
||||
import { foliage_color, grass_color, water_color } from "$/common/worldgen/biome_colors.ts";
|
||||
import {
|
||||
block_light_emission,
|
||||
block_light_opacity,
|
||||
@@ -45,7 +45,7 @@ export interface Chunk {
|
||||
max_y: number;
|
||||
// only for translucent meshes that have to be sorted again as the camera moves
|
||||
translucent_sort?: TranslucentSort;
|
||||
// each column's biome grass color, x then z, then each column's foliage color
|
||||
// each column's biome grass color, x then z, then each column's foliage color, then water color
|
||||
biome_colors: Uint32Array;
|
||||
// from its last mesh, see get_light. undefined until it's been meshed
|
||||
light?: Uint8Array;
|
||||
@@ -171,10 +171,11 @@ export class ClientLevel {
|
||||
if (!this.#in_storage_range(x, z)) {
|
||||
return;
|
||||
}
|
||||
const biome_colors = new Uint32Array(CHUNK_AREA * 2);
|
||||
const biome_colors = new Uint32Array(CHUNK_AREA * 3);
|
||||
biomes.forEach((biome, column) => {
|
||||
biome_colors[column] = grass_color(biome);
|
||||
biome_colors[CHUNK_AREA + column] = foliage_color(biome);
|
||||
biome_colors[CHUNK_AREA * 2 + column] = water_color(biome);
|
||||
});
|
||||
|
||||
const chunk = this.get_chunk(x, z);
|
||||
|
||||
Reference in New Issue
Block a user