how to achieve a cross fade between different cameras / scenes in three.js?

我的未来我决定 提交于 2020-01-03 03:25:15

问题


Is it possible, and if so, what is the best way to achieve the following effect in three.js:

I am displaying scene S1 as viewed from camera C1and from there:

  1. crossfade to scene S2 as viewed from camera C2, or
  2. crossfade to scene S1 as seen from camera C3

Any assistance helping me think about this will be greatly appreciated!


回答1:


Something like this is pretty easy:

  • Use 2 rendertargets to draw the different scenes from the different cameras
  • Use both rendertargets with this blend shader https://github.com/mrdoob/three.js/blob/master/examples/js/ShaderExtras.js#L1099


来源:https://stackoverflow.com/questions/12118056/how-to-achieve-a-cross-fade-between-different-cameras-scenes-in-three-js

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!