Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Glsl<T>

Type parameters

Hierarchy

  • Glsl

Index

Type aliases

Static AnyMatrix

AnyMatrix: Glsl<AnyMatrix>

Static AnyNumeric

AnyNumeric: Glsl<AnyNumeric>

Static AnyVector

AnyVector: Glsl<AnyVector>

Static Boolean

Boolean: Glsl<Boolean>

Static Matrix2

Matrix2: Glsl<Matrix2>

Static Matrix3

Matrix3: Glsl<Matrix3>

Static Matrix4

Matrix4: Glsl<Matrix4>

Static Sampler

Sampler: Glsl<Sampler>

Static Scalar

Scalar: Glsl<Scalar>

Static Vector2

Vector2: Glsl<Vector2>

Static Vector3

Vector3: Glsl<Vector3>

Static Vector4

Vector4: Glsl<Vector4>

Constructors

constructor

Properties

abs

abs: (Anonymous function) = Glsl.unary("abs")

acos

acos: (Anonymous function) = Glsl.unary("acos")

asin

asin: (Anonymous function) = Glsl.unary("asin")

ceil

ceil: (Anonymous function) = Glsl.unary("floor")

cos

cos: (Anonymous function) = Glsl.unary("cos")

degrees

degrees: (Anonymous function) = Glsl.unary("degrees")

eq

eq: (Anonymous function) = Glsl.bool("==")

Equal

exp

exp: (Anonymous function) = Glsl.unary("exp")

exp2

exp2: (Anonymous function) = Glsl.unary("exp2")

floor

floor: (Anonymous function) = Glsl.unary("floor")

fract

fract: (Anonymous function) = Glsl.unary("fract")

Readonly getValue

getValue: (builder: GlslBuilder) => Value<T>

Type declaration

gt

gt: (Anonymous function) = Glsl.bool(">")

Greater

gte

gte: (Anonymous function) = Glsl.bool(">=")

Greater or equal

inversesqrt

inversesqrt: (Anonymous function) = Glsl.unary("inversesqrt")

log

log: (Anonymous function) = Glsl.unary("log")

log2

log2: (Anonymous function) = Glsl.unary("log2")

lt

lt: (Anonymous function) = Glsl.bool("<")

Less

lte

lte: (Anonymous function) = Glsl.bool("<=")

Less or equal

neq

neq: (Anonymous function) = Glsl.bool("!=")

Not equal

normalize

normalize: (Anonymous function) = Glsl.unary("normalize")

not

not: (Anonymous function) = Glsl.unary<Type.Boolean>("!")

radians

radians: (Anonymous function) = Glsl.unary("radians")

sign

sign: (Anonymous function) = Glsl.unary("sign")

sin

sin: (Anonymous function) = Glsl.unary("sin")

sqrt

sqrt: (Anonymous function) = Glsl.unary("sqrt")

tan

tan: (Anonymous function) = Glsl.unary("tan")

Static PI

PI: Scalar = Glsl.val(Math.PI)

Methods

a

add

  • add<T>(this: T, other: T | Scalar | number): T
  • add<T>(this: Scalar, other: T): T

and

atan

b

cat

clamp

  • clamp<T>(this: T, min: T, max: T): T
  • clamp<T>(this: T, min: Scalar | number, max: Scalar | number): T

cond

  • Conditional expression

    Type parameters

    Parameters

    • this: Boolean
    • precision: Precision

      Precision of the expression result

    • whenTrue: T

      True brunch of the condition

    • whenFalse: T

      False brunch of the condition

    Returns T

condHQ

  • condHQ<T>(this: Boolean, whenTrue: T, whenFalse: T): T

condLQ

  • condLQ<T>(this: Boolean, whenTrue: T, whenFalse: T): T

condMQ

  • condMQ<T>(this: Boolean, whenTrue: T, whenFalse: T): T

distance

div

  • div<T>(this: T, other: T | Scalar | number): T
  • div<T>(this: Scalar, other: T): T

dot

g

length

max

mem

  • Save some expression into a variable

    Type parameters

    Parameters

    Returns T

memHQ

  • memHQ(): this
  • Save some expression with high quality into a variable

    Returns this

memLQ

  • memLQ(): this
  • Save some expression with low quality into a variable

    Returns this

memMQ

  • memMQ(): this
  • Save some expression with medium quality into a variable

    Returns this

min

mix

  • mix<P>(this: P, other: P, p: P): P
  • mix<P>(this: P, other: P, p: number): P
  • mix(this: Scalar, other: number, p: Scalar | number): Scalar

mod

mul

or

pow

r

reflect

  • reflect<T>(this: T, n: T): T

refract

  • refract<T>(this: T, n: T, eta: Scalar | number): T

round

  • round<T>(this: T): T

smoothstep

sub

  • sub<T>(this: T, other: T | Scalar | number): T
  • sub<T>(this: Scalar, other: T): T

take

texture2D

vec2

vec3

vec4

w

x

y

z

Static Private bool

  • bool(name: string): (Anonymous function)
  • Parameters

    • name: string

    Returns (Anonymous function)

Static Private call

Static Private unary

  • unary<X>(name: string): (Anonymous function)
  • Type parameters

    • X: Type = Type.AnyNumeric

    Parameters

    • name: string

    Returns (Anonymous function)

Static val

Generated using TypeDoc