Skip to main content

atlas_texture

Function atlas_texture 

Source
pub fn atlas_texture(
    rd: &mut Gd<RenderingDevice>,
    sink: &Arc<dyn RidSink>,
    width: u32,
    height: u32,
) -> RdTexture
Expand description

RGBA8-UNORM storage texture (compute writes, material samples). Used for the Phase-4 per-chunk colour/normal detail atlases: STORAGE_BIT so the bake compute pass can write it, SAMPLING_BIT so terrain_chunk.gdshader can texelFetch it. Normals are encoded *0.5+0.5 into [0,1] to fit unorm.