Skip to content

Latest commit

 

History

History
326 lines (263 loc) · 9.24 KB

File metadata and controls

326 lines (263 loc) · 9.24 KB

Lighting Functions

Half Direction

DescriptionNode Showcase:
Calculates the direction vector halfway between two vectors A and B.

Input Type Description
A Float3 The first vector, Vector A.
B Float3 The second vector, Vector B.
Output Type Description
Half Direction Float3 The halfway vector between Vector A and B.

L dot H

DescriptionNode Showcase:
Returns the dot product between the Light direction and the Half-way direction between the View and Light direction.

Input Type Description
View Direction Float3 The camera view direction.
Light Direction Float3 The light direction.
Output Type Description
LdotH Float The dot product value.

L dot V

DescriptionNode Showcase:
Returns the dot product between the Light direction and the View direction.

Input Type Description
View Direction Float3 The camera view direction.
Light Direction Float3 The light direction.
Output Type Description
LdotV Float the dot product value.

N dot H

DescriptionNode Showcase:
Returns the dot product between the surface Normal and the Halfway vector between the View direction and the Light direction.

Input Type Description
Normal Float3 The surface normal in world space.
View Direction Float3 The camera view direction.
Light Direction Float3 The light direction.
Output Type Description
NdotH Float the dot product value.

N dot L

DescriptionNode Showcase:
Returns the dot product between the surface Normal and the Light direction.

Input Type Description
Normal Float3 The surface normal in world space.
Light Direction Float3 The light direction.
Output Type Description
NdotL Float the dot product value.

N dot V

DescriptionNode Showcase:
Returns the dot product between the surface Normal and the View direction.

Input Type Description
Normal Float3 The surface normal in world space.
View Direction Float3 The camera view direction.
Output Type Description
NdotV Float the dot product value.

R dot V

DescriptionNode Showcase:
Returns the dot product between the Reflection direction and the View direction.

Input Type Description
Light Direction Float3 The light direction.
Normal Direction Float3 The surface normal in world space.
View Direction Float3 The camera view direction.
Output Type Description
RdotV Float the dot product value.

Reflect Direction

DescriptionNode Showcase:
Calculates the direction a light ray would reflect against a surface.

Input Type Description
Light Direction Float3 The light direction.
Normal Direction Float3 The surface normal in world space.
Output Type Description
Light Direction Float3 The reflection direction.

Schlick Fresnel

DescriptionNode Showcase:
Implements the Schlick Fresnel specular term.

Input Type Description
Specular Colour Color The Colour of the surface.
Light Direction Float3 The light direction.
View Direction Float3 The camera view direction.
Output Type Description
Schlick Fresnel Color The fresnel colour.

ShadeSH9

DescriptionNode Showcase:
Implements the Unity ShadeSH9 function. This allows for real time lighting usage in shading.

Input Type Description
Normal Float3 The surface normal in world space.
Output Type Description
SH Shading Float3 The Shading values.

SHEvalLinearL0L1

DescriptionNode Showcase:
Implements the Unity SHEvalLinearL0L1 function. This combines the Spherical Harmonics matrix's L0 and L1 coefficients.

Input Type Description
Normal Float3 The surface normal in world space.
Output Type Description
Spherical Harmonics Float3 The L0 and L1 coefficient combination.

SHEvalLinearL2

DescriptionNode Showcase:
Implements the Unity SHEvalLinearL2 function. This is the highest frequency band of the Spherical Harmonics.

Input Type Description
Normal Float3 The surface normal in world space.
Output Type Description
Spherical Harmonics Float3 The L2 Spherical Harmonics band.

SH Get Basis Vectors

DescriptionNode Showcase:
Gets the local XYZ coordinate space of Unity's Spherical Harmonics matrix (SHa terms).

Output Type Description
Harmonic XYZ Float3 The basis vectors of the Harmonics.

V dot H

DescriptionNode Showcase:
Returns the dot product between the View vector and the Halfway vector between the View and Light direction.

Input Type Description
View Direction Float3 The camera view direction.
Light Direction Float3 The light direction.
Output Type Description
VdotH Float the dot product value.