mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 04:33:37 +00:00
move uniforms around
This commit is contained in:
parent
5b48de96db
commit
c1bac8869e
5 changed files with 23 additions and 12 deletions
|
@ -6,7 +6,6 @@ use crate::{
|
||||||
plugin::load_plugin,
|
plugin::load_plugin,
|
||||||
render::{
|
render::{
|
||||||
passes::*,
|
passes::*,
|
||||||
render_graph_2,
|
|
||||||
render_graph_2::{
|
render_graph_2::{
|
||||||
passes::*, pipelines::*, renderers::wgpu_renderer::WgpuRenderer, resource_providers::*,
|
passes::*, pipelines::*, renderers::wgpu_renderer::WgpuRenderer, resource_providers::*,
|
||||||
StandardMaterial,
|
StandardMaterial,
|
||||||
|
|
|
@ -12,7 +12,7 @@ mod resource;
|
||||||
pub mod resource_name;
|
pub mod resource_name;
|
||||||
pub mod resource_provider;
|
pub mod resource_provider;
|
||||||
pub mod resource_providers;
|
pub mod resource_providers;
|
||||||
mod standard_material;
|
mod uniforms;
|
||||||
mod uniform;
|
mod uniform;
|
||||||
mod renderable;
|
mod renderable;
|
||||||
|
|
||||||
|
@ -24,6 +24,6 @@ pub use render_graph::*;
|
||||||
pub use renderer::*;
|
pub use renderer::*;
|
||||||
pub use resource::*;
|
pub use resource::*;
|
||||||
pub use resource_provider::*;
|
pub use resource_provider::*;
|
||||||
pub use standard_material::*;
|
pub use uniforms::*;
|
||||||
pub use uniform::*;
|
pub use uniform::*;
|
||||||
pub use renderable::*;
|
pub use renderable::*;
|
||||||
|
|
|
@ -1,19 +1,12 @@
|
||||||
use crate::{
|
use crate::{
|
||||||
math::Vec4,
|
|
||||||
render::render_graph_2::{
|
render::render_graph_2::{
|
||||||
uniform::{AsUniforms, GetBytes, UniformInfo},
|
uniform::{AsUniforms, UniformInfo},
|
||||||
BindType, UniformPropertyType,
|
BindType, UniformPropertyType,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
use bevy_derive::Uniforms;
|
|
||||||
use zerocopy::AsBytes;
|
use zerocopy::AsBytes;
|
||||||
|
|
||||||
#[derive(Uniforms)]
|
|
||||||
pub struct StandardMaterial {
|
|
||||||
pub albedo: Vec4,
|
|
||||||
}
|
|
||||||
|
|
||||||
const LOCAL_TO_WORLD_UNIFORM_INFO: &[UniformInfo] = &[UniformInfo {
|
const LOCAL_TO_WORLD_UNIFORM_INFO: &[UniformInfo] = &[UniformInfo {
|
||||||
name: "Object",
|
name: "Object",
|
||||||
bind_type: BindType::Uniform {
|
bind_type: BindType::Uniform {
|
||||||
|
@ -47,4 +40,4 @@ impl AsUniforms for bevy_transform::prelude::LocalToWorld {
|
||||||
_ => None,
|
_ => None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
5
src/render/render_graph_2/uniforms/mod.rs
Normal file
5
src/render/render_graph_2/uniforms/mod.rs
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
mod standard_material;
|
||||||
|
mod local_to_world;
|
||||||
|
|
||||||
|
pub use standard_material::*;
|
||||||
|
pub use local_to_world::*;
|
14
src/render/render_graph_2/uniforms/standard_material.rs
Normal file
14
src/render/render_graph_2/uniforms/standard_material.rs
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
use crate::{
|
||||||
|
math::Vec4,
|
||||||
|
render::render_graph_2::{
|
||||||
|
uniform::{AsUniforms, GetBytes, UniformInfo},
|
||||||
|
BindType, UniformPropertyType,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
use bevy_derive::Uniforms;
|
||||||
|
|
||||||
|
#[derive(Uniforms)]
|
||||||
|
pub struct StandardMaterial {
|
||||||
|
pub albedo: Vec4,
|
||||||
|
}
|
Loading…
Reference in a new issue