Cleanup some old unused shader code

This commit is contained in:
Wojtek Figat
2020-12-20 10:22:54 +01:00
parent afeaaee376
commit 8a870a07ae
25 changed files with 199 additions and 685 deletions

View File

@@ -57,7 +57,6 @@ int GetCubeFaceIndex(float3 direction)
float3 GetShadowPositionOffset(float offsetScale, float NoL, float3 normal)
{
// Note: offsetScale should be multiplied by 2*ShadowMapTextureTexelSize on CPU
float normalOffsetScale = saturate(1.0f - NoL);
return normal * (offsetScale * normalOffsetScale);
}
@@ -65,8 +64,6 @@ float3 GetShadowPositionOffset(float offsetScale, float NoL, float3 normal)
float CalculateSubsurfaceOcclusion(float opacity, float sceneDepth, float shadowMapDepth)
{
float thickness = max(sceneDepth - shadowMapDepth, 0);
//float density = -0.05f * log(1 - min(opacity, 0.999f));
//float occlusion = saturate(exp(-thickness * density));
float occlusion = 1 - thickness * lerp(1.0f, 100.0f, opacity);
return shadowMapDepth > 0.99f ? 1 : occlusion;
}