|
|
|
|
|
|
specularLighting *= 1.0 + bsdfData.fresnel0 * preLightData.energyCompensation; |
|
|
|
|
|
|
|
#ifdef DEBUG_DISPLAY |
|
|
|
|
|
|
|
switch(_DebugLightingMode) |
|
|
|
|
|
|
|
if (_DebugLightingMode != 0) |
|
|
|
switch (_DebugLightingMode) |
|
|
|
{ |
|
|
|
diffuseLighting = lighting.direct.diffuse + bakeLightingData.bakeDiffuseLighting; |
|
|
|
diffuseLighting = lighting.direct.diffuse + bakeLightingData.bakeDiffuseLighting; |
|
|
|
|
|
|
|
diffuseLighting = indirectAmbientOcclusion; |
|
|
|
specularLighting = float3(0.0, 0.0, 0.0); // Disable specular lighting |
|
|
|
diffuseLighting = indirectAmbientOcclusion; |
|
|
|
specularLighting = float3(0.0, 0.0, 0.0); // Disable specular lighting |
|
|
|
|
|
|
|
diffuseLighting = specularOcclusion; |
|
|
|
specularLighting = float3(0.0, 0.0, 0.0); // Disable specular lighting |
|
|
|
diffuseLighting = specularOcclusion; |
|
|
|
specularLighting = float3(0.0, 0.0, 0.0); // Disable specular lighting |
|
|
|
#if GTAO_MULTIBOUNCE_APPROX |
|
|
|
|
|
|
|
#if GTAO_MULTIBOUNCE_APPROX |
|
|
|
diffuseLighting = GTAOMultiBounce(indirectAmbientOcclusion, bsdfData.diffuseColor); |
|
|
|
specularLighting = float3(0.0, 0.0, 0.0); // Disable specular lighting |
|
|
|
diffuseLighting = GTAOMultiBounce(indirectAmbientOcclusion, bsdfData.diffuseColor); |
|
|
|
specularLighting = float3(0.0, 0.0, 0.0); // Disable specular lighting |
|
|
|
|
|
|
|
diffuseLighting = GTAOMultiBounce(specularOcclusion, bsdfData.fresnel0); |
|
|
|
specularLighting = float3(0.0, 0.0, 0.0); // Disable specular lighting |
|
|
|
break; |
|
|
|
#endif |
|
|
|
case DEBUGMIPMAPMODE_NONE: |
|
|
|
diffuseLighting = bsdfData.diffuseColor; |
|
|
|
diffuseLighting = GTAOMultiBounce(specularOcclusion, bsdfData.fresnel0); |
|
|
|
#endif |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
specularLighting = float3(0.0, 0.0, 0.0); // Disable specular lighting |
|
|
|
} |
|
|
|
specularLighting = float3(0.0, 0.0, 0.0); // Disable specular lighting |
|
|
|
} |
|
|
|
} |
|
|
|
else if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE) |
|
|
|
{ |
|
|
|
diffuseLighting = bsdfData.diffuseColor; |
|
|
|
specularLighting = float3(0.0, 0.0, 0.0); // Disable specular lighting |
|
|
|
} |
|
|
|
|
|
|
|
#endif |
|
|
|
} |
|
|
|
|