move uniforms around

This commit is contained in:
Carter Anderson 2020-02-09 18:09:54 -08:00
parent 5b48de96db
commit c1bac8869e
5 changed files with 23 additions and 12 deletions

View file

@ -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,

View file

@ -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::*;

View file

@ -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 {

View file

@ -0,0 +1,5 @@
mod standard_material;
mod local_to_world;
pub use standard_material::*;
pub use local_to_world::*;

View 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,
}