Skip to main content

celestialsim/gpu/
mod.rs

1//! Thin helpers over Godot's main `RenderingDevice`.
2//!
3//! Every function here must run on the **render thread** (the buffer RIDs we
4//! touch belong to the global device) — callers go through
5//! `RenderingServer::call_on_render_thread`, CEL-58 style.
6
7pub mod chunk_gpu;
8pub mod device;
9pub mod owned;
10
11/// Width (texels) of the GPU attribute/atlas textures: chunk vertex pools and
12/// per-chunk detail atlases are 1-D runs wrapped at this width. Shaders read it
13/// as `attr_w` to recover 2-D texel coords from a linear index.
14pub const ATTR_TEX_WIDTH: u32 = 4096;