A PhongShader uses the phong reflection model to determine the surface radiance.
For a more detailed description of the mechanism see the article on the Phong Reflection Model.
- Inheritance
- Object
- Shader
- PluggableShader
- AmbientShader
- PhongShader
Constructors
- PhongShader(Vector4 difCoeff, Vector4 specCoeff, double specExp, Vector4 ambCoeff)
-
Creates a new Phong Shader with the given diffuse, specular and ambient coefficients as well as the given specular exponent.
Properties
- ambCoeff → Vector4
-
The ambient coefficient of this shader.
read-only, inherited - difCoeff → Vector4
-
The diffuse and specular coefficient of this phong shader.
read-only - hashCode → int
-
Get a hash code for this object.…
read-only, inherited - normal → dynamic
-
The normal vector at the hit point. Must be stored in normalized form.
read / write, inherited - position → Point3
-
The position of the hit point.
read / write, inherited - runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited - specCoeff → Vector4
-
The diffuse and specular coefficient of this phong shader.
read-only - specExp → double
-
The specular exponent of this phong shader.
read-only
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.
inherited -
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.
inherited -
getReflectance(
Vector3 outDir, Vector3 inDir) → Vector4 -
Returns the reflectance for the associated
Primitiveat 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