34 lines
686 B
HLSL
34 lines
686 B
HLSL
float GetSpecularThreshold( float m_fMetalness )
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
struct BRDF_Data
|
|
{
|
|
float3 m_vRayIn;
|
|
float3 m_vRayOut;
|
|
float3 m_vNormal;
|
|
float3 m_vAlbedo;
|
|
float m_fRoughness;
|
|
float m_fMetalness;
|
|
|
|
float FresnelDiffuseTerm( float fSine )
|
|
{
|
|
return (fSine * (1 - 0.5 * m_fRoughness) + 0.5 * m_fRoughness);
|
|
}
|
|
|
|
float3 BurleyDiffuse( )
|
|
{
|
|
float fSineNormalLight = saturate(dot(m_vNormal, m_vRayOut));
|
|
float fSineNormalView = saturate(dot(m_vNormal, m_vRayIn));
|
|
float fFresnelLight = FresnelDiffuseTerm(fSineNormalLight);
|
|
float fFresnelView = FresnelDiffuseTerm(fSineNormalView);
|
|
return fFresnelView * fFresnelLight;
|
|
}
|
|
|
|
float3 GetOutGoingDirection()
|
|
{
|
|
return 0;
|
|
}
|
|
}
|