Struct three_d::renderer::material::IsosurfaceMaterial
source · 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: f32
Threshold (in the range [0..1]) that defines the surface in the voxel data.
color: Srgba
Base surface color.
metallic: f32
A value in the range [0..1]
specifying how metallic the surface is.
roughness: f32
A value in the range [0..1]
specifying how rough the surface is.
size: Vec3
The size of the cube that is used to render the voxel data. The texture is scaled to fill the entire cube.
lighting_model: LightingModel
The 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