EyeRefractMaterial

Struct EyeRefractMaterial 

Source
pub struct EyeRefractMaterial {
Show 15 fields pub iris: String, pub cornea_texture: String, pub cornea_bump_strength: f32, pub parallax_strength: f32, pub dilation: f32, pub light_warp_texture: String, pub env_map: String, pub glossiness: f32, pub ambient_occlusion_texture: String, pub ambient_occlusion_color: Vec3, pub ambiento_cclusion: f32, pub half_lambert: bool, pub ray_trace_sphere: bool, pub sphere_tex_kill_combo: bool, pub eye_ball_radius: f32,
}

Fields§

§iris: String

Usually referred to as a “sludge-layer”, acts as a layer on top of the surface of the $AboveWater Material.

§cornea_texture: String

A texture to specify the shape of the cornea, similar to a normal map. Influences lighting and dilation. The red and green channels are used for the normal mapping, the blue channel is a mask for parallax mapping (straight multiply), and the alpha channel seems to be a multiplier for lighting. Because the $iris is warped in various ways the normals will not match 1-to-1 with the base texture.

§cornea_bump_strength: f32

Strength of the $corneatexture.

§parallax_strength: f32

How much the viewing angle should influence the positioning of the eye

§dilation: f32

Dilates the pupil using the cornea texture to determine the shape of dilation. Default 0.5.

§light_warp_texture: String

1-dimensional texture which remaps lighting colors.

§env_map: String

Enables cubemap reflections. This shader has a specific cubemap made for it, engine/eye-reflection-cubemap-.vtf, but others can be used, including env_cubemap.

§glossiness: f32

The opacity of the cubemap reflection. Does not affect the eye glint. Default 0.5.

§ambient_occlusion_texture: String

An ambient occlusion texture overlaid onto the entire eye

§ambient_occlusion_color: Vec3

Tints the $ambientoccltexture

§ambiento_cclusion: f32

Strength of the dynamic ambient occlusion.

§half_lambert: bool

Enables half-lambertian lighting

§ray_trace_sphere: bool

Enables sphere raytracing. Each pixel is raytraced to allow sharper angles to look more accurate.

§sphere_tex_kill_combo: bool

Requires $raytracesphere 1. Causes pixels which don’t hit the raytraced sphere to be transparent, instead of rendering the “non-raytraced” eye behind it.

§eye_ball_radius: f32

Requires $raytracesphere 1. Radius of the eyeball. Should be the diameter of the eyeball divided by 2

Trait Implementations§

Source§

impl Clone for EyeRefractMaterial

Source§

fn clone(&self) -> EyeRefractMaterial

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for EyeRefractMaterial

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for EyeRefractMaterial

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for EyeRefractMaterial

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoResult<T> for T

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,