Lighting system
This commit is contained in:
@@ -5,6 +5,9 @@ import type { SortType } from "./translucent_sort.ts";
|
||||
|
||||
// messages between the main thread and the chunk workers
|
||||
|
||||
// position 3, uv 2, color 4 (directional shade and ambient occlusion, alpha), lightmap coordinates 2
|
||||
export const TERRAIN_VERTEX_FLOATS = 11;
|
||||
|
||||
export type ToChunkWorker =
|
||||
| {
|
||||
type: "init";
|
||||
@@ -23,7 +26,8 @@ export type ToChunkWorker =
|
||||
chunk_x: number;
|
||||
chunk_z: number;
|
||||
version: number;
|
||||
padded_chunk: Uint32Array;
|
||||
// copies of the blocks of the 3x3 chunks around it, going +x then +z from -x -z, for lighting
|
||||
chunks: (Uint32Array | null)[];
|
||||
// where the camera is, to sort the translucent quads
|
||||
camera: number[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user