这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@mosure
Copy link
Owner

@mosure mosure commented Feb 17, 2024

#[derive(StorageBindings, Planar)] - implements GpuStoragePlanar trait:

pub trait GpuStoragePlanar {
    type PackedType;
    type PlanarType;

    fn bind_group(
        &self,
        render_device: &bevy::render::renderer::RenderDevice,
        layout: &bevy::render::render_resource::BindGroupLayout,
    ) -> bevy::render::render_resource::BindGroup;

    fn bind_group_layout(
        &self,
        render_device: &bevy::render::renderer::RenderDevice,
        read_only: bool,
    ) -> bevy::render::render_resource::BindGroupLayout;

    fn ordered_field_names(&self) -> &'static [&'static str];

    fn prepare(
        render_device: &bevy::render::renderer::RenderDevice,
        planar: &Self::PlanarType,
    ) -> Self;
}

#[derive(TextureBindings, Planar)] - implements GpuStoragePlanar trait:

// TODO: texture bindings derive macro

@mosure mosure changed the title feat: automatic gpu storage/texture planar bind groups feat: automatic gpu storage planar bind groups Feb 17, 2024
@mosure mosure merged commit 357b469 into main Feb 17, 2024
@mosure mosure deleted the feat/auto-bind-group branch February 17, 2024 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants