pub struct IsosurfaceMaterial {
pub voxels: Arc<Texture3D>,
pub threshold: f32,
pub color: Srgba,
pub metallic: f32,
pub roughness: f32,
pub size: Vec3,
pub lighting_model: LightingModel,
}Expand description
A material that renders the isosurface defined by the voxel data in the IsosurfaceMaterial::voxels and the IsosurfaceMaterial::threshold. The surface is defined by all the points in the volume where the red channel of the voxel data is equal to the threshold. This material should be applied to a cube with center in origo, for example CpuMesh::cube.
Fields§
§voxels: Arc<Texture3D>The voxel data that defines the isosurface.
threshold: f32Threshold (in the range [0..1]) that defines the surface in the voxel data.
color: SrgbaBase surface color.
metallic: f32A value in the range [0..1] specifying how metallic the surface is.
roughness: f32A value in the range [0..1] specifying how rough the surface is.
size: Vec3The size of the cube that is used to render the voxel data. The texture is scaled to fill the entire cube.
lighting_model: LightingModelThe lighting model used when rendering this material
Trait Implementations§
Source§impl Clone for IsosurfaceMaterial
impl Clone for IsosurfaceMaterial
Source§fn clone(&self) -> IsosurfaceMaterial
fn clone(&self) -> IsosurfaceMaterial
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more