// Area light specific
// UVs for sampling the LUTs
// TODO: Test with fastAcos
float theta = acos(dot(bsdfData.normalWS, V));
float theta = FastACos(dot(bsdfData.normalWS, V));
// Scale and bias for the current precomputed table - the constant use here are the one that have been use when the table in LtcData.DisneyDiffuse.cs and LtcData.GGX.cs was use
float2 uv = 0.0078125 + 0.984375 * float2(bsdfData.perceptualRoughness, theta * INV_HALF_PI);
}
#ifndef DIFFUSE_LAMBERT_BRDF
// TODO: verify that we do not need to multiply by PI.
ltcValue *= preLightData.ltcDisneyDiffuseMagnitude;
#endif
ltcValue *= lightData.specularScale;
specularLighting = fresnelTerm * lightData.color * ltcValue;
}
// TODO: current area light code doesn't take into account artist attenuation radius!
#endif
}
uint sampleCount = 2048)
{
float3 N = bsdfData.normalWS;
float3 tangentX = bsdfData.tangentWS;
float3 tangentY = bsdfData.bitangentWS;
float3 tangentX, tangentY;
GetLocalFrame(N, tangentX, tangentY);
for (uint i = 0; i < sampleCount; ++i)
{
float2 u = Hammersley2d(i, sampleCount);
float3 V, EnvLightData lightData, BSDFData bsdfData,
uint sampleCount = 2048)
{
float3 N = bsdfData.normalWS;
float NdotV = dot(N, V) ;
float3 acc = float3(0.0, 0.0, 0.0) ;
float3 N = bsdfData.normalWS;
float3 tangentX = bsdfData.tangentWS ;
float3 tangentY = bsdfData.bitangentWS ;
float NdotV = saturate(dot(N, V));
float3 acc = float3(0.0, 0.0, 0.0);
float3 tangentX, tangentY;
GetLocalFrame(N, tangentX, tangentY);
for (uint i = 0; i < sampleCount; ++i)
{
uint sampleCount = 2048)
{
float3 N = bsdfData.normalWS;
float NdotV = saturate(dot(N, V));
float3 tangentX = bsdfData.tangentWS;
float3 tangentY = bsdfData.bitangentWS;
float NdotV = saturate(dot(N, V));
float3 tangentX, tangentY;
GetLocalFrame(N, tangentX, tangentY);
for (uint i = 0; i < sampleCount; ++i)
{
*/
diffuseLighting = float3(0.0, 0.0, 0.0);
weight = float2(0.0, 0 .0);
weight = float2(0.0, 1 .0);
#else
// TODO: factor this code in common, so other material authoring don't require to rewrite everything,