iamnick

Scissor Rects

Recommended Posts

I've been trying to combine two cameras together using a scissor rect function for Unity that I tried to repurpose for Babylon, but I can't seem to get it working.  Could someone look at it and tell me what I'm doing wrong?  Perhaps there's a better way of doing this inside of Babylon that I'm unaware of?

The working Unity script:
https://answers.unity.com/questions/1112309/screen-is-2-cameras-with-each-different-properties.html#answer-1112586

The not working playground:
https://playground.babylonjs.com/#JJYFI8

The implementation inside of Unity.  The cameras both have different clear colors.

948392799_ScreenShot2018-12-03at11_56_30PM.png.dc9571572aa99f190c7e5dbc21c61cf1.png

Share this post


Link to post
Share on other sites

@JohnK I still want to use the same scene between both cameras.  What i need is have 2 cameras that basically halve the view frustrum.  So when using a viewport rect, it resizes the camera view to fill the rect whereas i need to use a scissor rect to instead crop the viewport so that it's like im still seeing it in the regular viewport size but only the area I defined in the rect.  The scissor rect is jist cropping the viewport.

The included screenshot is a working version of a scissor rect that I'd like to port to Babylon.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.