|
@@ -23587,6 +23587,10 @@ THREE.ShaderChunk[ 'shadowmap_pars_vertex' ] = "#ifdef USE_SHADOWMAP\n #if NUM_D
|
|
|
|
|
|
THREE.ShaderChunk[ 'shadowmap_vertex' ] = "#ifdef USE_SHADOWMAP\n #if NUM_DIR_LIGHTS > 0\n for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\n }\n #endif\n #if NUM_SPOT_LIGHTS > 0\n for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n vSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\n }\n #endif\n #if NUM_POINT_LIGHTS > 0\n for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\n }\n #endif\n#endif\n";
|
|
|
|
|
|
+// File:src/renderers/shaders/ShaderChunk/shadowmask_pars_fragment.glsl
|
|
|
+
|
|
|
+THREE.ShaderChunk[ 'shadowmask_pars_fragment' ] = "float getShadowMask() {\n float shadow = 1.0;\n #ifdef USE_SHADOWMAP\n #if NUM_DIR_LIGHTS > 0\n DirectionalLight directionalLight;\n for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n directionalLight = directionalLights[ i ];\n shadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n }\n #endif\n #if NUM_SPOT_LIGHTS > 0\n SpotLight spotLight;\n for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n spotLight = spotLights[ i ];\n shadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n }\n #endif\n #if NUM_POINT_LIGHTS > 0\n PointLight pointLight;\n for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n pointLight = pointLights[ i ];\n shadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ] ) : 1.0;\n }\n #endif\n #endif\n return shadow;\n}\n";
|
|
|
+
|
|
|
// File:src/renderers/shaders/ShaderChunk/skinbase_vertex.glsl
|
|
|
|
|
|
THREE.ShaderChunk[ 'skinbase_vertex' ] = "#ifdef USE_SKINNING\n mat4 boneMatX = getBoneMatrix( skinIndex.x );\n mat4 boneMatY = getBoneMatrix( skinIndex.y );\n mat4 boneMatZ = getBoneMatrix( skinIndex.z );\n mat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif";
|
|
@@ -23981,7 +23985,7 @@ THREE.ShaderLib = {
|
|
|
|
|
|
THREE.ShaderChunk[ "aomap_fragment" ],
|
|
|
|
|
|
- "vec3 outgoingLight = reflectedLight.indirectDiffuse;",
|
|
|
+ " vec3 outgoingLight = reflectedLight.indirectDiffuse;",
|
|
|
|
|
|
THREE.ShaderChunk[ "envmap_fragment" ],
|
|
|
THREE.ShaderChunk[ "linear_to_gamma_fragment" ],
|
|
@@ -24090,8 +24094,10 @@ THREE.ShaderLib = {
|
|
|
THREE.ShaderChunk[ "envmap_pars_fragment" ],
|
|
|
THREE.ShaderChunk[ "bsdfs" ],
|
|
|
THREE.ShaderChunk[ "ambient_pars" ],
|
|
|
+ THREE.ShaderChunk[ "lights_pars" ],
|
|
|
THREE.ShaderChunk[ "fog_pars_fragment" ],
|
|
|
THREE.ShaderChunk[ "shadowmap_pars_fragment" ],
|
|
|
+ THREE.ShaderChunk[ "shadowmask_pars_fragment" ],
|
|
|
THREE.ShaderChunk[ "specularmap_pars_fragment" ],
|
|
|
THREE.ShaderChunk[ "logdepthbuf_pars_fragment" ],
|
|
|
|
|
@@ -24126,7 +24132,7 @@ THREE.ShaderLib = {
|
|
|
|
|
|
" #endif",
|
|
|
|
|
|
- " reflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );",
|
|
|
+ " reflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();",
|
|
|
|
|
|
// modulation
|
|
|
THREE.ShaderChunk[ "aomap_fragment" ],
|
|
@@ -32588,36 +32594,43 @@ Object.defineProperties( THREE.Light.prototype, {
|
|
|
},
|
|
|
shadowCameraFov: {
|
|
|
set: function ( value ) {
|
|
|
+ console.warn( 'THREE.Light: .shadowCameraFov is now .shadow.camera.fov.' );
|
|
|
this.shadow.camera.fov = value;
|
|
|
}
|
|
|
},
|
|
|
shadowCameraLeft: {
|
|
|
set: function ( value ) {
|
|
|
+ console.warn( 'THREE.Light: .shadowCameraLeft is now .shadow.camera.left.' );
|
|
|
this.shadow.camera.left = value;
|
|
|
}
|
|
|
},
|
|
|
shadowCameraRight: {
|
|
|
set: function ( value ) {
|
|
|
+ console.warn( 'THREE.Light: .shadowCameraRight is now .shadow.camera.right.' );
|
|
|
this.shadow.camera.right = value;
|
|
|
}
|
|
|
},
|
|
|
shadowCameraTop: {
|
|
|
set: function ( value ) {
|
|
|
+ console.warn( 'THREE.Light: .shadowCameraTop is now .shadow.camera.top.' );
|
|
|
this.shadow.camera.top = value;
|
|
|
}
|
|
|
},
|
|
|
shadowCameraBottom: {
|
|
|
set: function ( value ) {
|
|
|
+ console.warn( 'THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom.' );
|
|
|
this.shadow.camera.bottom = value;
|
|
|
}
|
|
|
},
|
|
|
shadowCameraNear: {
|
|
|
set: function ( value ) {
|
|
|
+ console.warn( 'THREE.Light: .shadowCameraNear is now .shadow.camera.near.' );
|
|
|
this.shadow.camera.near = value;
|
|
|
}
|
|
|
},
|
|
|
shadowCameraFar: {
|
|
|
set: function ( value ) {
|
|
|
+ console.warn( 'THREE.Light: .shadowCameraFar is now .shadow.camera.far.' );
|
|
|
this.shadow.camera.far = value;
|
|
|
}
|
|
|
},
|
|
@@ -32628,6 +32641,7 @@ Object.defineProperties( THREE.Light.prototype, {
|
|
|
},
|
|
|
shadowBias: {
|
|
|
set: function ( value ) {
|
|
|
+ console.warn( 'THREE.Light: .shadowBias is now .shadow.bias.' );
|
|
|
this.shadow.bias = value;
|
|
|
}
|
|
|
},
|
|
@@ -32638,11 +32652,13 @@ Object.defineProperties( THREE.Light.prototype, {
|
|
|
},
|
|
|
shadowMapWidth: {
|
|
|
set: function ( value ) {
|
|
|
+ console.warn( 'THREE.Light: .shadowMapWidth is now .shadow.mapSize.width.' );
|
|
|
this.shadow.mapSize.width = value;
|
|
|
}
|
|
|
},
|
|
|
shadowMapHeight: {
|
|
|
set: function ( value ) {
|
|
|
+ console.warn( 'THREE.Light: .shadowMapHeight is now .shadow.mapSize.height.' );
|
|
|
this.shadow.mapSize.height = value;
|
|
|
}
|
|
|
}
|