pub struct Material {Show 14 fields
pub name: String,
pub english_name: String,
pub diffuse: Vec4,
pub specular: Vec3,
pub specular_factor: f32,
pub ambient: Vec3,
pub draw_mode: MaterialFlags,
pub edge_color: Vec4,
pub edge_size: f32,
pub texture_index: i32,
pub sphere_mode: Option<SphereMode>,
pub toon_mode: ToonMode,
pub memo: String,
pub num_face_vertices: i32,
}Expand description
as a sample you can pass Vulkan like glsl code.
layout (set = 0 ,binding = 0) Material{
vec4 diffuse;
vec3 specular;
float specular_exponent;
vec3 ambient;
bool render_self_shadow;
vec4 edge_color;
int sphere_texture_mode;
}
layout (set = 1 ,binding = 0) sampler2D color_texture;
layout (set = 1 ,binding = 1) sampler2D sphere_texture;
layout (set = 1 ,binding = 2) sampler2D toon_texture;refer PMX仕様.txt 276~310
Fields§
§name: String§english_name: String§diffuse: Vec4§specular: Vec3§specular_factor: f32§ambient: Vec3§draw_mode: MaterialFlags§edge_color: Vec4§edge_size: f32§texture_index: i32§sphere_mode: Option<SphereMode>§toon_mode: ToonMode§memo: String§num_face_vertices: i32Trait Implementations§
impl StructuralPartialEq for Material
Auto Trait Implementations§
impl Freeze for Material
impl RefUnwindSafe for Material
impl Send for Material
impl Sync for Material
impl Unpin for Material
impl UnwindSafe for Material
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more