|
|
|
|
|
|
#else |
|
|
|
half cascadeIndex = 0; |
|
|
|
#endif |
|
|
|
#if !defined(MAIN_LIGHT_CALCULATE_SHADOWS) |
|
|
|
float shadowMapSample = 1.0; |
|
|
|
#else |
|
|
|
#endif |
|
|
|
float isInShadow = step(shadowMapSample, shadowCoord.z); |
|
|
|
float isInShadow = 1 - shadowMapSample; |
|
|
|
|
|
|
|
shadowAtten -= isInShadow * oneDivNumSteps; |
|
|
|
// If the position is out of shadow distance, just return 1 |
|
|
|