#define_import_path nightshade_renderer::material_data
//! The material table every pass that shades from a material reads.
//!
//! It lives here rather than in one pass's shader so the passes cannot drift
//! apart from each other or from the cpu struct that writes it. The layout is
//! mirrored by `MaterialData` in `material_gpu.rs`, field for field including
//! the padding: a member's alignment decides the stride, so a `vec3` where the
//! cpu wrote three scalars silently shifts every material after the first.
struct TextureTransform {
row_u: vec4<f32>,
row_v: vec4<f32>,
};
struct Material {
base_color: vec4<f32>,
emissive_factor: vec3<f32>,
alpha_mode: u32,
alpha_cutoff: f32,
base_layer: u32,
emissive_layer: u32,
normal_layer: u32,
metallic_roughness_layer: u32,
occlusion_layer: u32,
normal_scale: f32,
occlusion_strength: f32,
roughness: f32,
metallic: f32,
unlit: u32,
normal_map_flags: u32,
transmission_factor: f32,
transmission_layer: u32,
thickness: f32,
thickness_layer: u32,
attenuation_color: vec3<f32>,
attenuation_distance: f32,
ior: f32,
specular_factor: f32,
_align_specular: vec2<u32>,
specular_color_factor: vec3<f32>,
specular_layer: u32,
specular_color_layer: u32,
emissive_strength: f32,
_pad_before_transforms: vec2<u32>,
base_transform: TextureTransform,
emissive_transform: TextureTransform,
normal_transform: TextureTransform,
metallic_roughness_transform: TextureTransform,
occlusion_transform: TextureTransform,
transmission_transform: TextureTransform,
thickness_transform: TextureTransform,
specular_transform: TextureTransform,
specular_color_transform: TextureTransform,
clearcoat_factor: f32,
clearcoat_roughness_factor: f32,
clearcoat_normal_scale: f32,
clearcoat_layer: u32,
clearcoat_roughness_layer: u32,
clearcoat_normal_layer: u32,
_pad_clearcoat: vec2<u32>,
clearcoat_transform: TextureTransform,
clearcoat_roughness_transform: TextureTransform,
clearcoat_normal_transform: TextureTransform,
sheen_color_factor: vec3<f32>,
sheen_roughness_factor: f32,
sheen_color_layer: u32,
_pad_sheen_word: u32,
_pad_sheen: vec2<u32>,
sheen_color_transform: TextureTransform,
sheen_roughness_transform: TextureTransform,
iridescence_factor: f32,
iridescence_ior: f32,
iridescence_thickness_minimum: f32,
iridescence_thickness_maximum: f32,
iridescence_layer: u32,
_pad_iridescence_word: u32,
_pad_iridescence: vec2<u32>,
iridescence_transform: TextureTransform,
iridescence_thickness_transform: TextureTransform,
anisotropy_strength: f32,
anisotropy_rotation_cos: f32,
anisotropy_rotation_sin: f32,
anisotropy_layer: u32,
anisotropy_transform: TextureTransform,
dispersion: f32,
diffuse_transmission_factor: f32,
_pad_diffuse_transmission_word: u32,
diffuse_transmission_color_layer: u32,
diffuse_transmission_color_factor: vec3<f32>,
blend_opaque_alpha_threshold: f32,
diffuse_transmission_transform: TextureTransform,
diffuse_transmission_color_transform: TextureTransform,
detail_base_layer: u32,
detail_normal_layer: u32,
height_layer: u32,
detail_uv_scale: f32,
parallax_scale: f32,
_pad_detail_a: u32,
_pad_detail_b: u32,
_pad_detail_c: u32,
reflection_box_min: vec3<f32>,
_pad_box_min: f32,
reflection_box_max: vec3<f32>,
_pad_box_max: f32,
};