Closed xuchaozou closed 1 year ago
Duplicate of #386.
Support for scissor/viewport is planned but not there yet.
do you mean multiple camera example:
// render first view
renderer.setViewport(0, 0, window.innerWidth / 3, window.innerHeight);
renderer.setScissor(0, 0, window.innerWidth / 3, window.innerHeight);
renderer.setScissorTest(true);
renderer.render(scene, camera1);
// render second view
renderer.setViewport(window.innerWidth / 3, 0, window.innerWidth / 3, window.innerHeight);
renderer.setScissor(window.innerWidth / 3, 0, window.innerWidth / 3, window.innerHeight);
renderer.setScissorTest(true);
renderer.render(scene, camera2);
//render thrid view
renderer.setViewport((window.innerWidth / 3) * 2, 0, window.innerWidth / 3, window.innerHeight);
renderer.setScissor((window.innerWidth / 3) * 2, 0, window.innerWidth / 3, window.innerHeight);
renderer.setScissorTest(true);
renderer.render(scene, camera3);
i see the code , it's always only a camera
Oh, have you tried using multiple RenderPass
instances with different cameras? You can change scissor/viewport settings in-between passes with the LambdaPass. Also make sure to disable auto clear of the render passes: renderPass.clearPass.enabled = false
.
But I end up using EffectPass, and the first parameter of effectPass can only be the camera parameter, and I don't know how to render different parts of the same dom with multiple cameras
To achieve this effect, look at a model different camera different view, their post-processing is the same
Scissor/viewport is not supported by postprocessing
yet.
Applying image effects to different viewports requires API changes that will be included in the next major version v7.
When will the v7 version be released? I urgently need this feature support, thank you
Is your feature request related to a problem?
Now we need to do the three-view function,
May I ask how the configuration can support this new requirement, i need to you help thanks!!!
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.