oa::SurfaceMaterial
Metallic/roughness PBR material for scene geometry. OA evaluates GGX specular and Lambertian diffuse using base color, metalness, perceptual roughness, and dielectric index of refraction. Direct light, flat ambient, and emission form the current renderer subset. Base/ORM/normal descriptors are connected, but their sampling variants are not enabled by the current shader build. Texture sampling, coat, sheen, subsurface, separate emission/opacity maps, and interchange adapters remain Planned. Texture channel packing (ORM convention): orm_texture R = ambient occlusion, G = roughness, B = metalness. normal_texture stores tangent-space XY as BC5 SNORM; Z is reconstructed as sqrt(saturate(1 - dot(n.xy, n.xy))). All color values are linear at this API boundary.
Declaration
pub struct SurfaceMaterial {Show 28 fields pub base_color: [f32; 3], pub base_color_texture: Option<TextureHandle>, pub metalness: f32, pub roughness: f32, pub orm_texture: Option<TextureHandle>, pub normal_texture: Option<TextureHandle>, pub normal_scale: f32, pub specular_ior: f32, pub specular_tint: [f32; 3], pub emission_color: [f32; 3], pub emission_scale: f32, pub emission_texture: Option<TextureHandle>, pub coat_weight: f32, pub coat_roughness: f32, pub coat_ior: f32, pub coat_normal_texture: Option<TextureHandle>, pub sheen_weight: f32, pub sheen_color: [f32; 3], pub sheen_roughness: f32, pub subsurface_weight: f32, pub subsurface_color: [f32; 3], pub subsurface_radius: [f32; 3], pub opacity: f32, pub opacity_texture: Option<TextureHandle>, pub alpha_mode: AlphaMode, pub alpha_cutoff: f32, pub uv_scale: [f32; 2], pub uv_offset: [f32; 2], }Public Methods
Associated Functions
Public Data Members
base_color[f32; 3]fieldbase_color_textureOption<TextureHandle>fieldmetalnessf32fieldroughnessf32fieldorm_textureOption<TextureHandle>fieldnormal_textureOption<TextureHandle>fieldnormal_scalef32fieldspecular_iorf32fieldspecular_tint[f32; 3]fieldemission_color[f32; 3]fieldemission_scalef32fieldemission_textureOption<TextureHandle>fieldcoat_weightf32fieldcoat_roughnessf32fieldcoat_iorf32fieldcoat_normal_textureOption<TextureHandle>fieldsheen_weightf32fieldsheen_color[f32; 3]fieldsheen_roughnessf32fieldsubsurface_weightf32fieldsubsurface_color[f32; 3]fieldsubsurface_radius[f32; 3]fieldopacityf32fieldopacity_textureOption<TextureHandle>fieldalpha_modeAlphaModefieldalpha_cutofff32fielduv_scale[f32; 2]fielduv_offset[f32; 2]field