Surface class final

What ReadSurface produces, for the models that need more than the albedo. Mutable, because the GLSL passes it as inout to every map function and each one modifies a field. A copy-returning version would read better and would be a different program.

Constructors

Surface(Vector3 albedo, double alpha, Vector3 normal, Vector3 world, Vector3 ambient, double metallic, double roughness, Vector3 view, double nDotV, Vector4 tangent)

Properties

albedo ↔ Vector3
getter/setter pair
alpha ↔ double
Opacity, nought to one.
getter/setter pair
ambient → Vector3
Hemispheric and already scaled by the scene's strength: the sky above, the ground bounce below, blended by which way the surface faces.
final
emissive ↔ Vector3
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
metallic ↔ double
How metallic the surface is, nought to one.
getter/setter pair
nDotV ↔ double
Clamped away from zero: a grazing view otherwise divides by zero in the specular visibility term. A cosine, with no unit.
getter/setter pair
normal ↔ Vector3
getter/setter pair
occlusion ↔ double
Neutral until a map says otherwise, so a model that samples nothing still has a complete surface.
getter/setter pair
roughness ↔ double
Perceptual roughness, nought to one.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tangent → Vector4
xyz the tangent, w the bitangent sign — glTF's convention for a mirrored UV island.
final
view → Vector3
Towards the eye, which every specular term needs.
final
world → Vector3
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited