Rename crate folders to remove raidillon prefix
This commit is contained in:
parent
176ea52ab0
commit
3458662cfc
29 changed files with 31 additions and 28 deletions
|
|
@ -1,57 +0,0 @@
|
|||
use glium::{IndexBuffer, VertexBuffer, implement_vertex};
|
||||
use glium::texture::{SrgbTexture2d, Texture2d};
|
||||
use glium::uniforms::SamplerBehavior;
|
||||
use glam::{Vec2};
|
||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Vertex {
|
||||
pub position: [f32; 3],
|
||||
pub normal: [f32; 3],
|
||||
pub tex_coords: [f32; 2],
|
||||
}
|
||||
implement_vertex!(Vertex, position, normal, tex_coords);
|
||||
|
||||
pub struct Mesh {
|
||||
pub vbuf: VertexBuffer<Vertex>,
|
||||
pub ibuf: IndexBuffer<u32>,
|
||||
}
|
||||
|
||||
pub struct Material {
|
||||
pub base_color: Option<SrgbTexture2d>,
|
||||
pub metallic_roughness: Option<Texture2d>,
|
||||
pub normal: Option<Texture2d>,
|
||||
pub occlusion: Option<Texture2d>,
|
||||
pub emissive: Option<SrgbTexture2d>,
|
||||
pub sampler: SamplerBehavior,
|
||||
pub uv_offset: Vec2,
|
||||
pub uv_scale: Vec2,
|
||||
pub base_color_factor: [f32; 4],
|
||||
pub emissive_factor: [f32; 3],
|
||||
pub metal_factor: f32,
|
||||
pub roughness_factor: f32,
|
||||
}
|
||||
|
||||
impl Default for Material {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
base_color: None,
|
||||
metallic_roughness: None,
|
||||
normal: None,
|
||||
occlusion: None,
|
||||
emissive: None,
|
||||
sampler: SamplerBehavior::default(),
|
||||
uv_offset: Vec2::ZERO,
|
||||
uv_scale: Vec2::ONE,
|
||||
base_color_factor: [1.0; 4],
|
||||
emissive_factor: [0.0; 3],
|
||||
metal_factor: 1.0,
|
||||
roughness_factor: 1.0,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Model {
|
||||
pub mesh: Mesh,
|
||||
pub material: Material,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue