Jump to content

How to smoothly change environment textures


hcmetal
 Share

Recommended Posts

Hello everyone,

Trying to change scene environment textures smoothly with some kind of  'fade-in-out' effect rather than a hard toggle.

Please consider this PG:  https://playground.babylonjs.com/#26LZLL

When the buttons are clicked, the environment texture is toggled between two .env maps.

Is it possible to make the toggle more smooth, so it is more like a 'transition' than a 'snap'?

Even a simple overlay of the two maps is ok.

Hope someone can point me to the right direction.

Thanks a lot!

PS: Those handy test spheres in the PG are kindly provided by @PatrickRyan

Link to comment
Share on other sites

Hello, this is not supported as only one environment texture is available. 

You could probably do it but it might be expensive as you need to create on each frame a new environment texture in a renderTarget by mixing the two first ones.

This implies to render each faces * the number of mipmaps + a combination of the polynomials.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...