Skip to content

Commit

Permalink
bevy_pbr2: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
superdump committed Aug 26, 2021
1 parent 0ab73d8 commit cf8a4ff
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pipelined/bevy_pbr2/src/render/depth.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var view: View;

[[block]]
struct Mesh {
transform: mat4x4<f32>;
model: mat4x4<f32>;
};
[[group(1), binding(0)]]
var mesh: Mesh;
Expand All @@ -25,6 +25,6 @@ struct VertexOutput {
[[stage(vertex)]]
fn vertex(vertex: Vertex) -> VertexOutput {
var out: VertexOutput;
out.clip_position = view.view_proj * mesh.transform * vec4<f32>(vertex.position, 1.0);
out.clip_position = view.view_proj * mesh.model * vec4<f32>(vertex.position, 1.0);
return out;
}
2 changes: 2 additions & 0 deletions pipelined/bevy_pbr2/src/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ impl FromWorld for PbrShaders {
ty: BindingType::Buffer {
ty: BufferBindingType::Uniform,
has_dynamic_offset: true,
// TODO: change this to MeshUniform::std140_size_static once crevice fixes this!
// Context: https://github.com/LPGhatguy/crevice/issues/29
min_binding_size: BufferSize::new(144),
},
count: None,
Expand Down
2 changes: 1 addition & 1 deletion pipelined/bevy_sprite2/src/render/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use bevy_render2::{
renderer::{RenderContext, RenderDevice},
shader::Shader,
texture::{BevyDefault, Image},
view::{ViewMeta, ViewUniform, ViewUniformOffset},
view::{ViewMeta, ViewUniformOffset},
RenderWorld,
};
use bevy_transform::components::GlobalTransform;
Expand Down

0 comments on commit cf8a4ff

Please sign in to comment.