如何在three.js中实现不同摄像机/场景之间的交叉淡入淡出? [英] how to achieve a cross fade between different cameras / scenes in three.js?

查看:97
本文介绍了如何在three.js中实现不同摄像机/场景之间的交叉淡入淡出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可能,如果是这样,在three.js中实现以下效果的最佳方法是什么:

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

我正在显示从相机看到的场景S1 C1和从那里:

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


  1. 从相机C2看到的交叉渐变到场景S2,或

  2. 交叉淡入淡出到从相机C3看到的场景S1

任何帮助我思考这个问题的帮助都将非常感谢!

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

推荐答案

这样的事情非常简单:

  • 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

这篇关于如何在three.js中实现不同摄像机/场景之间的交叉淡入淡出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆