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,
|
||||
render::{
|
||||
passes::*,
|
||||
render_graph_2,
|
||||
render_graph_2::{
|
||||
passes::*, pipelines::*, renderers::wgpu_renderer::WgpuRenderer, resource_providers::*,
|
||||
StandardMaterial,
|
||||
|
|
|
@ -12,7 +12,7 @@ mod resource;
|
|||
pub mod resource_name;
|
||||
pub mod resource_provider;
|
||||
pub mod resource_providers;
|
||||
mod standard_material;
|
||||
mod uniforms;
|
||||
mod uniform;
|
||||
mod renderable;
|
||||
|
||||
|
@ -24,6 +24,6 @@ pub use render_graph::*;
|
|||
pub use renderer::*;
|
||||
pub use resource::*;
|
||||
pub use resource_provider::*;
|
||||
pub use standard_material::*;
|
||||
pub use uniforms::*;
|
||||
pub use uniform::*;
|
||||
pub use renderable::*;
|
||||
|
|
|
@ -1,19 +1,12 @@
|
|||
use crate::{
|
||||
math::Vec4,
|
||||
render::render_graph_2::{
|
||||
uniform::{AsUniforms, GetBytes, UniformInfo},
|
||||
uniform::{AsUniforms, UniformInfo},
|
||||
BindType, UniformPropertyType,
|
||||
},
|
||||
};
|
||||
|
||||
use bevy_derive::Uniforms;
|
||||
use zerocopy::AsBytes;
|
||||
|
||||
#[derive(Uniforms)]
|
||||
pub struct StandardMaterial {
|
||||
pub albedo: Vec4,
|
||||
}
|
||||
|
||||
const LOCAL_TO_WORLD_UNIFORM_INFO: &[UniformInfo] = &[UniformInfo {
|
||||
name: "Object",
|
||||
bind_type: BindType::Uniform {
|
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