materials: add transparency and refractive_index to Material.

This commit is contained in:
Bill Thiede 2021-07-25 16:33:03 -07:00
parent 7f36aecf5e
commit 1d61f59935

View File

@ -18,6 +18,8 @@ pub struct Material {
pub specular: Float,
pub shininess: Float,
pub reflective: Float,
pub transparency: Float,
pub refractive_index: Float,
}
impl Default for Material {
@ -37,6 +39,8 @@ impl Default for Material {
/// specular: 0.9,
/// shininess: 200.,
/// reflective: 0.0,
/// transparency: 0.0,
/// refractive_index: 1.0,
/// }
/// );
/// ```
@ -48,6 +52,8 @@ impl Default for Material {
specular: 0.9,
shininess: 200.,
reflective: 0.0,
transparency: 0.0,
refractive_index: 1.0,
}
}
}