Skip to main content

Module surface_reading

Module surface_reading 

Source
Expand description

Per-vertex surface colour reading.

The quantized mesh section stores positions only. One organ albedo painted in the shader is still one flat colour, even when a light shades the faces. This section is the reading on the part: one RGBA8 sample per vertex, in the same order as the mesh. It is not a texture, not a normal, and not a game-specific dialect.

Constants§

SURFACE_READING_MAGIC
Magic SRD1.

Functions§

decode_surface_reading
None when the payload is not a surface reading or the count is short.
encode_surface_reading
Quantize authored readings to RGBA8. Length must match the mesh.
encoded_len
Byte size of an SRD1 section for vertex_count readings (8-byte header + 4 bytes per RGBA8 vertex).