问题
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:
- crossfade to scene S2 as viewed from camera C2, or
- 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