Expand description
Lowering for Command::SceneTexture:
a caller-owned GPU texture drawn over a destination rectangle.
The command is the scene layer’s one reference to a texture the engine did
not produce. It carries an opaque u64 and a destination rectangle and
nothing else — no pixels, no extent, no sampler — because the scene layer
depends on no GPU crate (see frust_scene::Command::SceneTexture). So the
two halves of the lowering sit on opposite sides of the frame:
- the extent is registry state, learned when the host registers the
texture and kept here in
ExternalExtentsso the walk can compose the same natural-pixels-onto-destmapping [Command::Image] uses; and - the view is the renderer’s, resolved after compiling against the same
registry (see
crate::gpu::bindings).
The split is what keeps this module free of wgpu, like the rest of
compile. It is also why an unregistered id is decided here rather than at
encode time: with no extent there is no mapping to compose, so the draw
never reaches the frame’s paint table at all.
Unlike an atlas-backed image, nothing is made resident and nothing is
uploaded — the texels are the caller’s, already on the device. The encoded
entry is therefore a plain EncodedExternalTexture naming the id, the
source region and the inverse device-to-texel transform the shader applies.
Structs§
- External
Encoding - One encoded external-texture paint: the paint a draw references, and where its entry landed in the frame’s paint table.
- External
Extents - The texel extent of every externally bound texture, keyed by the opaque id
a
Command::SceneTexturenames it by.
Enums§
- External
Skip - Why a
Command::SceneTexturerecorded no draw.
Functions§
- encode_
scene_ texture - Encode a
Command::SceneTexture: the whole of the texture bound underidscaled to filldest, undertransform.