three.js 让阴影更黑更暗_shadow

r166 可以通过设置intensity属性来配置每个光源的阴影强度

three.js 让阴影更黑更暗_javascript_02

light.shadow.intensity = 3;

或者 修改shader

three.js 让阴影更黑更暗_javascript_03

THREE.ShaderChunk["shadowmap_pars_fragment"]=THREE.ShaderChunk["shadowmap_pars_fragment"].replace(
"occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );",
"occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 0.1 );"
);

或者

THREE.ShaderChunk["shadowmap_pars_fragment"]=THREE.ShaderChunk["shadowmap_pars_fragment"].replace(
"occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );",
"occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 )*0.1;"
);