[ATOM-15864] Added diffuseResponse to lambertian diffuse calculation
This commit is contained in:
+1
-1
@@ -28,7 +28,7 @@ float3 GetDiffuseLighting(Surface surface, LightingData lightingData, float3 lig
|
||||
}
|
||||
else
|
||||
{
|
||||
diffuse = DiffuseLambertian(surface.albedo, surface.normal, dirToLight);
|
||||
diffuse = DiffuseLambertian(surface.albedo, surface.normal, dirToLight, lightingData.diffuseResponse);
|
||||
}
|
||||
|
||||
if(o_clearCoat_feature_enabled)
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ float3 GetDiffuseLighting(Surface surface, LightingData lightingData, float3 lig
|
||||
}
|
||||
else
|
||||
{
|
||||
diffuse = DiffuseLambertian(surface.albedo, surface.normal, dirToLight);
|
||||
diffuse = DiffuseLambertian(surface.albedo, surface.normal, dirToLight, lightingData.diffuseResponse);
|
||||
}
|
||||
|
||||
if(o_clearCoat_feature_enabled)
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@
|
||||
// Then define the Diffuse and Specular lighting functions
|
||||
float3 GetDiffuseLighting(Surface surface, LightingData lightingData, float3 lightIntensity, float3 dirToLight)
|
||||
{
|
||||
float3 diffuse = DiffuseLambertian(surface.albedo, surface.normal, dirToLight);
|
||||
float3 diffuse = DiffuseLambertian(surface.albedo, surface.normal, dirToLight, lightingData.diffuseResponse);
|
||||
|
||||
if(o_clearCoat_feature_enabled)
|
||||
{
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
// ------- Diffuse Lighting -------
|
||||
|
||||
//! Simple Lambertian BRDF.
|
||||
float3 DiffuseLambertian(float3 albedo, float3 normal, float3 dirToLight)
|
||||
float3 DiffuseLambertian(float3 albedo, float3 normal, float3 dirToLight, float diffuseResponse)
|
||||
{
|
||||
float NdotL = saturate(dot(normal, dirToLight));
|
||||
return albedo * NdotL * INV_PI;
|
||||
return albedo * NdotL * INV_PI * diffuseResponse;
|
||||
}
|
||||
|
||||
// Normalized Disney diffuse function taken from Frostbite's PBR course notes (page 10):
|
||||
|
||||
Reference in New Issue
Block a user