|
@@ -40,7 +40,7 @@ IncidentLight directLight;
|
|
getPointDirectLightIrradiance( pointLight, geometry, directLight );
|
|
getPointDirectLightIrradiance( pointLight, geometry, directLight );
|
|
|
|
|
|
#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )
|
|
#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )
|
|
- directLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;
|
|
|
|
|
|
+ directLight.color *= all( bvec3( pointLight.shadow, directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;
|
|
#endif
|
|
#endif
|
|
|
|
|
|
RE_Direct( directLight, geometry, material, reflectedLight );
|
|
RE_Direct( directLight, geometry, material, reflectedLight );
|
|
@@ -61,7 +61,7 @@ IncidentLight directLight;
|
|
getSpotDirectLightIrradiance( spotLight, geometry, directLight );
|
|
getSpotDirectLightIrradiance( spotLight, geometry, directLight );
|
|
|
|
|
|
#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
|
|
#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
|
|
- directLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;
|
|
|
|
|
|
+ directLight.color *= all( bvec3( spotLight.shadow, directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;
|
|
#endif
|
|
#endif
|
|
|
|
|
|
RE_Direct( directLight, geometry, material, reflectedLight );
|
|
RE_Direct( directLight, geometry, material, reflectedLight );
|
|
@@ -82,7 +82,7 @@ IncidentLight directLight;
|
|
getDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );
|
|
getDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );
|
|
|
|
|
|
#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )
|
|
#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )
|
|
- directLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
|
|
|
|
|
|
+ directLight.color *= all( bvec3( directionalLight.shadow, directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
|
|
#endif
|
|
#endif
|
|
|
|
|
|
RE_Direct( directLight, geometry, material, reflectedLight );
|
|
RE_Direct( directLight, geometry, material, reflectedLight );
|