45 lines
688 B
Plaintext
45 lines
688 B
Plaintext
|
#ifdef USE_SHADOWMAP
|
||
|
|
||
|
#if NUM_DIR_LIGHTS > 0
|
||
|
|
||
|
#pragma unroll_loop
|
||
|
for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {
|
||
|
|
||
|
vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;
|
||
|
|
||
|
}
|
||
|
|
||
|
#endif
|
||
|
|
||
|
#if NUM_SPOT_LIGHTS > 0
|
||
|
|
||
|
#pragma unroll_loop
|
||
|
for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {
|
||
|
|
||
|
vSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;
|
||
|
|
||
|
}
|
||
|
|
||
|
#endif
|
||
|
|
||
|
#if NUM_POINT_LIGHTS > 0
|
||
|
|
||
|
#pragma unroll_loop
|
||
|
for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {
|
||
|
|
||
|
vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;
|
||
|
|
||
|
}
|
||
|
|
||
|
#endif
|
||
|
|
||
|
/*
|
||
|
#if NUM_RECT_AREA_LIGHTS > 0
|
||
|
|
||
|
// TODO (abelnation): update vAreaShadowCoord with area light info
|
||
|
|
||
|
#endif
|
||
|
*/
|
||
|
|
||
|
#endif
|