Skip to main content

Operation

Enum Operation 

Source
pub enum Operation {
Show 60 variants Unk, Mix, Mul, Div, Add, Sub, Fma, MulRatio, AddNormalX, AddNormalY, Overlay, Overlay2, OverlayRatio, Power, Min, Max, Clamp, Abs, Fresnel, Sqrt, TexMatrix, TexParallaxX, TexParallaxY, ReflectX, ReflectY, ReflectZ, Floor, Select, Equal, NotEqual, Less, Greater, LessEqual, GreaterEqual, Dot4, NormalMapX, NormalMapY, NormalMapZ, MonochromeX, MonochromeY, MonochromeZ, Negate, FurInstanceAlpha, Float, Int, Uint, Truncate, FloatBitsToInt, IntBitsToFloat, UintBitsToFloat, InverseSqrt, Not, LeftShift, RightShift, PartialDerivativeX, PartialDerivativeY, Exp2, Log2, Sin, Cos,
}
Expand description

A function or operation applied to one or more OutputExpr.

Variants§

§

Unk

An unsupported operation or function call.

§

Mix

mix(arg0, arg1, arg2)

§

Mul

arg0 * arg1

§

Div

arg0 / arg1

§

Add

arg0 + arg1

§

Sub

arg0 - arg1

§

Fma

fma(arg0, arg1, arg2) or arg0 * arg1 + arg2

§

MulRatio

mix(arg0, arg0 * arg1, arg2)

§

AddNormalX

Blend mode add_normal(n1_x, n1_y, n2_x, n2_y, ratio).x similar to “Reoriented Normal Mapping” (RNM).

§

AddNormalY

Blend mode add_normal(n1_x, n1_y, n2_x, n2_y, ratio).y similar to “Reoriented Normal Mapping” (RNM).

§

Overlay

overlay(arg0, arg1).

§

Overlay2

overlay2(arg0, arg1).

§

OverlayRatio

mix(arg0, overlay(arg0, arg1), arg2).

§

Power

pow(arg0, arg1)

§

Min

min(arg0, arg1)

§

Max

max(arg0, arg1)

§

Clamp

clamp(arg0, arg1, arg2)

§

Abs

abs(arg0)

§

Fresnel

pow(1.0 - n_dot_v, arg0 * 5.0)

§

Sqrt

sqrt(arg0)

§

TexMatrix

dot(vec4(arg0, arg1, 0.0, 1.0), (arg2, arg3, arg4, arg5))

§

TexParallaxX

arg0 + arg1 * 0.7 * (normal.x * tangent.x - normal.x * bitangent.x)

§

TexParallaxY

arg0 + arg1 * 0.7 * (normal.x * tangent.y - normal.x * bitangent.y)

§

ReflectX

reflect(vec3(arg0, arg1, arg2), vec3(arg3, arg4, arg5)).x

§

ReflectY

reflect(vec3(arg0, arg1, arg2), vec3(arg3, arg4, arg5)).y

§

ReflectZ

reflect(vec3(arg0, arg1, arg2), vec3(arg3, arg4, arg5)).z

§

Floor

floor(arg0)

§

Select

if arg0 { arg1 } else { arg2 } or mix(arg2, arg1, arg0)

§

Equal

arg0 == arg1

§

NotEqual

arg0 != arg1

§

Less

arg0 < arg1

§

Greater

arg0 > arg1

§

LessEqual

arg0 <= arg1

§

GreaterEqual

arg0 >= arg1

§

Dot4

dot(vec4(arg0, arg1, arg2, arg3), vec4(arg4, arg5, arg6, arg7))

§

NormalMapX

apply_normal_map(create_normal_map(arg0, arg1), tangent.xyz, bitangent.xyz, normal.xyz).x

§

NormalMapY

apply_normal_map(create_normal_map(arg0, arg1), tangent.xyz, bitangent.xyz, normal.xyz).y

§

NormalMapZ

apply_normal_map(create_normal_map(arg0, arg1), tangent.xyz, bitangent.xyz, normal.xyz).z

§

MonochromeX

monochrome(arg0, arg1, arg2, arg3).x

§

MonochromeY

monochrome(arg0, arg1, arg2, arg3).y

§

MonochromeZ

monochrome(arg0, arg1, arg2, arg3).z

§

Negate

-arg0

§

FurInstanceAlpha

fur_instance_alpha(instance_index, arg0)

§

Float

float(arg0)

§

Int

int(arg0)

§

Uint

uint(arg0)

§

Truncate

trunc(arg0)

§

FloatBitsToInt

floatBitsToInt(arg0)

§

IntBitsToFloat

intBitsToFloat(arg0)

§

UintBitsToFloat

uintBitsToFloat(arg0)

§

InverseSqrt

inversesqrt(arg0)

§

Not

!arg0

§

LeftShift

arg0 << arg1

§

RightShift

arg0 >> arg1

§

PartialDerivativeX

dFdx(arg0) or dpdx(arg0)

§

PartialDerivativeY

dFdy(arg0) or dpdy(arg0)

§

Exp2

exp2(arg0)

§

Log2

log2(arg0)

§

Sin

sin(arg0)

§

Cos

cos(arg0)

Implementations§

Source§

impl Operation

Source

pub const fn from_repr(discriminant: usize) -> Option<Operation>

Try to create Self from the raw representation

Trait Implementations§

Source§

impl Clone for Operation

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for Operation

Source§

impl Debug for Operation

Source§

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

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

impl Default for Operation

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Display for Operation

Source§

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

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

impl Eq for Operation

Source§

impl Hash for Operation

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Operation

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Operation

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> CustomError for T
where T: Display + Debug + Send + Sync + 'static,

Source§

fn as_any(&self) -> &(dyn Any + Sync + Send + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + Sync + Send + 'static)

Source§

fn as_box_any(self: Box<T>) -> Box<dyn Any + Sync + Send>

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<R, P> ReadPrimitive<R> for P
where R: Read + ReadEndian<P>, P: Default,

Source§

fn read_from_little_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
Source§

fn read_from_big_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
Source§

fn read_from_native_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
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> ToSmolStr for T
where T: Display + ?Sized,

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more