简体   繁体   中英

three.js: If enabling shadow maps for the renderer, setting alpha for the clear color no longer works

I am initializing the renderer with alpha: true and setting clearcolor this way:

renderer.setClearColor(0xFFFFFF, 0.6);

When I turn on shadowmaps ( renderer.shadowMapEnabled = true; ), the alpha setting has no effect (it's as if I set it to 1 ).

I can get back the alpha background if I comment out the shadowMapEnabled line.

Has anyone else experienced this? I'm wondering if there is a workaround.

Fixed in the three.js r.72 dev branch.

https://github.com/mrdoob/three.js/pull/7124

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM