pub enum TextureSource {
Texture {
texture: Entity,
sampler: SamplerState,
},
Default {
value: [f32; 4],
why: String,
},
Frame(FrameTexture),
Missing {
why: String,
},
Target {
view: TargetView,
},
}Expand description
What a texture slot samples.
Variants§
Texture
A texture entity (core.texture, core.texture_layers or core.texture_file), with the sampler state stored
with it.
Default
No texture; the slot reads this value everywhere, and why.
Frame(FrameTexture)
An image of the frame being drawn, which the consumer supplies.
Missing
Nothing is bound and the source says no default: a consumer must not invent one. The reason retains the source’s resource identity and the missing evidence, so consumers can explain the refusal.
Target
A view of one of the frame’s own targets: only in the binding of a step of the frame’s core.render_graph
(crate::render_graph), whose targets these are. A material’s binding never states one. It is read through the
program’s samplers, whose states the stage states (StageBinding::samplers): a sampler’s state belongs to the
sampler, which one texture may be read through several of.
Fields
view: TargetViewImplementations§
Source§impl TextureSource
impl TextureSource
Sourcepub fn spatial_kind(&self) -> SpatialKind
pub fn spatial_kind(&self) -> SpatialKind
How the bound image moves into a program frame. A source’s own textures and a graph’s own targets are in its programs’ frame already.