Skip to content

ArrayCamera: bounds vs viewport #16361

@fernandojsg

Description

@fernandojsg

On the ArrayCamera documentation currently we can read the following requirement:
https://github.com/mrdoob/three.js/blob/dev/docs/api/en/cameras/ArrayCamera.html#L17

It's mandatory to define for each sub camera the *bounds* property which determines the part of the viewport that is rendered with this camera.

But I just noticed that the webgl_array_camera example has changed from using bounds to viewport:
7a4c962#diff-4922b91cfbe857ae22c8196e08f64f00L40

While on WebVRManager we still use bounds to define each camera's viewport:
https://github.com/mrdoob/three.js/blob/dev/src/renderers/webvr/WebVRManager.js#L45-L49

I believe bounds is usually a better option as it could let us easily adapt the real viewport size when resizing the window or when changing between different RenderTargets (as we do on WebVR or when using Multiview FBOs).

@mrdoob do you mind clarifying this, if both options should be supported, or are you switching to use just one of them? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions