|
|
|
|
|
|
// add the depth bias |
|
|
|
coord.z += depthBias; |
|
|
|
|
|
|
|
half shadow = 0; |
|
|
|
float shadow = 0.0; |
|
|
|
for (int i = 0; i < 4; i++) |
|
|
|
[loop] for (int i = 0; i < 4; i++) |
|
|
|
{ |
|
|
|
shadow += fetchesWeights[i] * SampleCompShadow_T2DA( shadowContext, texIdx, sampIdx, float3( fetchesUV[i].xy, coord.z ), slice ).x; |
|
|
|
} |
|
|
|
|
|
|
// add the depth bias |
|
|
|
coord.z += depthBias; |
|
|
|
|
|
|
|
half shadow = 0; |
|
|
|
float shadow = 0.0; |
|
|
|
float fetchesWeights[4]; |
|
|
|
float2 fetchesUV[4]; |
|
|
|
|
|
|
|
|
|
|
// add the depth bias |
|
|
|
coord.z += depthBias; |
|
|
|
|
|
|
|
half shadow = 0; |
|
|
|
float shadow = 0.0; |
|
|
|
for (int i = 0; i < 9; i++) |
|
|
|
[loop] for (int i = 0; i < 9; i++) |
|
|
|
{ |
|
|
|
shadow += fetchesWeights[i] * SampleCompShadow_T2DA( shadowContext, texIdx, sampIdx, float3( fetchesUV[i].xy, coord.z ), slice ).x; |
|
|
|
} |
|
|
|
|
|
|
// add the depth bias |
|
|
|
coord.z += depthBias; |
|
|
|
|
|
|
|
half shadow = 0; |
|
|
|
float shadow = 0.0; |
|
|
|
float fetchesWeights[9]; |
|
|
|
float2 fetchesUV[9]; |
|
|
|
|
|
|
|
|
|
|
// add the depth bias |
|
|
|
coord.z += depthBias; |
|
|
|
|
|
|
|
half shadow = 0; |
|
|
|
float shadow = 0.0; |
|
|
|
for (int i = 0; i < 16; i++) |
|
|
|
[loop] for (int i = 0; i < 16; i++) |
|
|
|
|
|
|
|
return shadow; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
// add the depth bias |
|
|
|
coord.z += depthBias; |
|
|
|
|
|
|
|
half shadow = 0; |
|
|
|
float shadow = 0.0; |
|
|
|
float fetchesWeights[16]; |
|
|
|
float2 fetchesUV[16]; |
|
|
|
|
|
|
|
|
|
|
shadow += fetchesWeights[i] * SAMPLE_TEXTURE2D_ARRAY_SHADOW( tex, compSamp, float3( fetchesUV[i].xy, coord.z ), slice ).x; |
|
|
|
} |
|
|
|
|
|
|
|
return shadow; |
|
|
|
} |
|
|
|
|
|
|
|