three.js - THREE.StereoEffect / webVR-boilerplate + THREE.Mirror

后端 未结 2 1890
悲哀的现实
悲哀的现实 2021-01-07 00:00

I\'m trying to get a mirror effect working correctly in a project that is using webvr-boilerplate when VREffect is active.

I tried (using r72dev and r72) to use THR

2条回答
  •  余生分开走
    2021-01-07 00:24

    This answer is based on the code in your live example, not the code in your post.

    The problem is that StereoEffect calls renderer.clear(), but it is clearing the mirror's previously-rendered WebGLRenderTarget.

    One solution is to do something like the following:

    verticalMirror.render();
    
    renderer.setRenderTarget( null ); // add this line
    
    effect.render( scene, camera );
    

    three.js r.72

提交回复
热议问题