A Shader determines the appearance of a Primitive at a certain hit point.

It can calculate the reflectance, ambient coefficient and indirect radiance.

Implemented by

Constructors

Shader()

Properties

hashCode → int

Get a hash code for this object.

read-only, inherited
runtimeType → Type

A representation of the runtime type of the object.

read-only, inherited

Operators

operator ==(other) → bool

The equality operator.

inherited

Methods

clone() Shader

Returns a hard copy (clone) of the current shader.

getAmbientCoeff() → Vector4

Returns the ambient coefficient of the primitive at the hit point. Returns the zero vector, if shader does not support ambient lighting.

getIndirectRadiance() → Vector4

Returns the radiance which comes from indirect illumination. This is the case for a reflected ray on a mirror. Returns the zero vector, if shader does not support indirect radiance.

getReflectance(Vector3 outDir, Vector3 inDir) → Vector4

Returns the reflectance for the associated Primitive at the associated hitpoint and and for the given direction vectors.

noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited
toString() → String

Returns a string representation of this object.

inherited