18 lines
389 B
Rust
18 lines
389 B
Rust
use bevy_core::bytes::Byteable;
|
|
use bevy_derive::Uniforms;
|
|
|
|
#[repr(C)]
|
|
#[derive(Clone, Copy, Uniforms)]
|
|
#[module(bevy_render = "crate")]
|
|
pub struct Vertex {
|
|
#[uniform(vertex)]
|
|
pub position: [f32; 3],
|
|
#[uniform(vertex)]
|
|
pub normal: [f32; 3],
|
|
#[uniform(vertex)]
|
|
pub uv: [f32; 2],
|
|
}
|
|
|
|
// SAFE: Vertex is repr(C) containing primitives
|
|
unsafe impl Byteable for Vertex {}
|