Photon Engine 2.0.0-beta
A physically based renderer.
|
Dielectric-dielectric interface Fresnel effect. More...
#include <DielectricFresnel.h>
Public Member Functions | |
DielectricFresnel (real iorOuter, real iorInner) | |
math::Spectrum | calcReflectance (real cosThetaIncident) const override=0 |
std::optional< math::Vector3R > | calcRefractDir (const math::Vector3R &I, const math::Vector3R &N) const |
Calculates the normalized refraction direction. | |
std::optional< real > | calcRefractCos (const math::Vector3R &I, const math::Vector3R &N) const |
Calculates the cosine (signed) of refraction direction. This method is similar to calcRefractDir() , but is slightly more efficient as it returns the cosine of refraction direction only. | |
real | getIorOuter () const |
real | getIorInner () const |
Public Member Functions inherited from ph::FresnelEffect | |
virtual | ~FresnelEffect ()=default |
math::Spectrum | calcTransmittance (real cosThetaIncident) const |
Protected Attributes | |
real | m_iorOuter |
real | m_iorInner |
Dielectric-dielectric interface Fresnel effect.
Fresnel effect where both inner and outer sides are dielectric.
ph::DielectricFresnel::DielectricFresnel | ( | real | iorOuter, |
real | iorInner ) |
|
overridepure virtual |
cosThetaIncident | Cosine of the incident angle. |
cosThetaIncident
is signed, so inner and outer sides can be determined. Implements ph::FresnelEffect.
Implemented in ph::ExactDielectricFresnel, and ph::SchlickApproxDielectricFresnel.
std::optional< real > ph::DielectricFresnel::calcRefractCos | ( | const math::Vector3R & | I, |
const math::Vector3R & | N ) const |
Calculates the cosine (signed) of refraction direction. This method is similar to calcRefractDir()
, but is slightly more efficient as it returns the cosine of refraction direction only.
I | The normalized incident direction. Pointing away from the interface. |
N | The normalized normal. Pointing to the outer side of the interface. |
N
. May be empty if refraction is not possible, e.g., due to TIR. std::optional< math::Vector3R > ph::DielectricFresnel::calcRefractDir | ( | const math::Vector3R & | I, |
const math::Vector3R & | N ) const |
Calculates the normalized refraction direction.
I | The normalized incident direction. Pointing away from the interface. |
N | The normalized normal. Pointing to the outer side of the interface. |
|
inline |
|
inline |
|
protected |
|
protected |