|
|
|
|
|
|
|
|
|
|
if (NdotL > 0.0) |
|
|
|
{ |
|
|
|
float3 H = normalize(L + V); |
|
|
|
float LdotH = dot(L, H); |
|
|
|
float LdotV = dot(L, V); |
|
|
|
float disneyDiffuse = DisneyDiffuse(NdotV, NdotL, LdotH, bsdfData.perceptualRoughness); |
|
|
|
float disneyDiffuse = DisneyDiffuse(NdotV, NdotL, LdotV, bsdfData.perceptualRoughness); |
|
|
|
|
|
|
|
// diffuse Albedo is apply here as describe in ImportanceSampleLambert function |
|
|
|
float4 val = SampleEnv(lightLoopContext, lightData.envIndex, L, 0); |
|
|
|