pub trait BindSemantics<H = NoUniformBinder, C = Option<()>, S = Box<[u8]>>where
    C: Copy,
    S: Deref<Target = [u8]> + DerefMut,
    H: BindUniform<C, f32> + BindUniform<C, u32> + BindUniform<C, i32> + for<'b> BindUniform<C, &'b [f32; 4]> + for<'b> BindUniform<C, &'b [f32; 16]>,
{ type InputTexture: TextureInput; type SamplerSet; type DescriptorSet<'a>; type DeviceContext; type UniformOffset: ContextOffset<H, C>; fn bind_texture<'a>(
        descriptors: &mut Self::DescriptorSet<'a>,
        samplers: &Self::SamplerSet,
        binding: &TextureBinding,
        texture: &Self::InputTexture,
        device: &Self::DeviceContext
    ); fn bind_semantics<'a>(
        device: &Self::DeviceContext,
        sampler_set: &Self::SamplerSet,
        uniform_storage: &mut UniformStorage<H, C, S>,
        descriptor_set: &mut Self::DescriptorSet<'a>,
        mvp: &[f32; 16],
        frame_count: u32,
        frame_direction: i32,
        framebuffer_size: Size<u32>,
        viewport_size: Size<u32>,
        original: &Self::InputTexture,
        source: &Self::InputTexture,
        uniform_bindings: &HashMap<UniformBinding, Self::UniformOffset, impl BuildHasher>,
        texture_meta: &HashMap<Semantic<TextureSemantics>, TextureBinding, impl BuildHasher>,
        pass_outputs: impl Iterator<Item = Option<impl AsRef<Self::InputTexture>>>,
        pass_feedback: impl Iterator<Item = Option<impl AsRef<Self::InputTexture>>>,
        original_history: impl Iterator<Item = Option<impl AsRef<Self::InputTexture>>>,
        lookup_textures: impl Iterator<Item = (usize, impl AsRef<Self::InputTexture>)>,
        parameter_defaults: &HashMap<String, ShaderParameter, impl BuildHasher>,
        runtime_parameters: &HashMap<String, f32, impl BuildHasher>
    ) { ... } }
Expand description

Trait that abstracts binding of semantics to shader uniforms.

Required Associated Types§

source

type InputTexture: TextureInput

The type of the input texture used for semantic binding.

source

type SamplerSet

The set of texture samplers available.

source

type DescriptorSet<'a>

The descriptor set or object that holds sampler and texture bindings.

source

type DeviceContext

The device context containing the state of the graphics processor.

source

type UniformOffset: ContextOffset<H, C>

The type of uniform offsets to use.

Required Methods§

source

fn bind_texture<'a>(
    descriptors: &mut Self::DescriptorSet<'a>,
    samplers: &Self::SamplerSet,
    binding: &TextureBinding,
    texture: &Self::InputTexture,
    device: &Self::DeviceContext
)

Bind a texture to the input descriptor set

Provided Methods§

source

fn bind_semantics<'a>(
    device: &Self::DeviceContext,
    sampler_set: &Self::SamplerSet,
    uniform_storage: &mut UniformStorage<H, C, S>,
    descriptor_set: &mut Self::DescriptorSet<'a>,
    mvp: &[f32; 16],
    frame_count: u32,
    frame_direction: i32,
    framebuffer_size: Size<u32>,
    viewport_size: Size<u32>,
    original: &Self::InputTexture,
    source: &Self::InputTexture,
    uniform_bindings: &HashMap<UniformBinding, Self::UniformOffset, impl BuildHasher>,
    texture_meta: &HashMap<Semantic<TextureSemantics>, TextureBinding, impl BuildHasher>,
    pass_outputs: impl Iterator<Item = Option<impl AsRef<Self::InputTexture>>>,
    pass_feedback: impl Iterator<Item = Option<impl AsRef<Self::InputTexture>>>,
    original_history: impl Iterator<Item = Option<impl AsRef<Self::InputTexture>>>,
    lookup_textures: impl Iterator<Item = (usize, impl AsRef<Self::InputTexture>)>,
    parameter_defaults: &HashMap<String, ShaderParameter, impl BuildHasher>,
    runtime_parameters: &HashMap<String, f32, impl BuildHasher>
)

Write uniform and texture semantics to the provided storages.

Implementors§