Update order of code

This commit is contained in:
Hanno Braun 2022-10-13 12:02:42 +02:00
parent e892d8f3ff
commit ecb0301cc6

View File

@ -1,3 +1,11 @@
struct Uniforms {
transform: mat4x4<f32>,
transform_normals: mat4x4<f32>,
};
@group(0) @binding(0)
var<uniform> uniforms: Uniforms;
struct VertexInput { struct VertexInput {
@location(0) position: vec3<f32>, @location(0) position: vec3<f32>,
@location(1) normal: vec3<f32>, @location(1) normal: vec3<f32>,
@ -10,14 +18,6 @@ struct VertexOutput {
@location(1) color: vec4<f32>, @location(1) color: vec4<f32>,
}; };
struct Uniforms {
transform: mat4x4<f32>,
transform_normals: mat4x4<f32>,
};
@group(0) @binding(0)
var<uniform> uniforms: Uniforms;
@vertex @vertex
fn vertex(in: VertexInput) -> VertexOutput { fn vertex(in: VertexInput) -> VertexOutput {
var out: VertexOutput; var out: VertexOutput;