lots of updates
This commit is contained in:
33
funnyassets/shaders/brdf.hlsl
Normal file
33
funnyassets/shaders/brdf.hlsl
Normal file
@@ -0,0 +1,33 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user