|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
if (projectionModel == PROJECTIONMODEL_NONE) |
|
|
|
return lighting; |
|
|
|
return lighting; |
|
|
|
|
|
|
|
// ------------------------------- |
|
|
|
// Initialize screen space tracing |
|
|
|
|
|
|
|
|
|
|
if (_DebugLightingMode != 0) |
|
|
|
{ |
|
|
|
specularLighting = float3(0.0, 0.0, 0.0); // Disable specular lighting |
|
|
|
bool keepSpecular = false; |
|
|
|
|
|
|
|
switch (_DebugLightingMode) |
|
|
|
{ |
|
|
|
|
|
|
case DEBUGLIGHTINGMODE_SCREEN_SPACE_TRACING_REFRACTION: |
|
|
|
if (_DebugLightingSubMode != DEBUGSCREENSPACETRACING_COLOR) |
|
|
|
diffuseLighting = lighting.indirect.specularTransmitted; |
|
|
|
else |
|
|
|
keepSpecular = true; |
|
|
|
break; |
|
|
|
|
|
|
|
case DEBUGLIGHTINGMODE_SCREEN_SPACE_TRACING_REFLECTION: |
|
|
|
if (_DebugLightingSubMode != DEBUGSCREENSPACETRACING_COLOR) |
|
|
|
diffuseLighting = lighting.indirect.specularReflected; |
|
|
|
else |
|
|
|
keepSpecular = true; |
|
|
|
|
|
|
|
if (!keepSpecular) |
|
|
|
specularLighting = float3(0.0, 0.0, 0.0); // Disable specular lighting |
|
|
|
} |
|
|
|
else if (_DebugMipMapMode != DEBUGMIPMAPMODE_NONE) |
|
|
|
{ |
|
|
|