Another option to your code above would be to render the sky shader to a render target and use the texture from that as the scenes environment, there’s a good example on how to do that in Mugens post here Using shader material as texture - #2 by Mugen87 which is pretty much what you’re doing already without having to traverse the scene to hide all other objects and then reinstate their visibility every frame, instead just using a render target to get the sky alone as a texture output…
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Bad performances when animating a PMREMGenerator environment | 2 | 495 | February 15, 2023 | |
Generating an environment map from scratch | 4 | 10890 | May 6, 2022 | |
Ability to reuse the PMREM generated texture from scene.environment | 11 | 1820 | May 5, 2022 | |
Live envmaps and getting realistic studio lighting almost for free | 9 | 6231 | July 12, 2022 | |
Sky.js shader example - why doesn't it use a cube map / camera? | 3 | 1111 | June 28, 2020 |