Jump to content

When rendering canvas is quite big, 3D drawing area is cropped at half the size of the canvas


Vousk-prod.
 Share

Recommended Posts

Hi everyone !

I've just noticed that when the rendering canvas size is quite big, above a certain size the 3D drawing area is suddenly cropped (to half the size of the rendering canvas, it seems).

If you lower the width of the canvas, the height limit increases, and vice versa. And a strange fact: critical values are different depending on the context.

Here are some cases (on my computer, values may differ on yours)

- On a simple web page:

3500px x 1024px : ok
3500px x 1025px (and above) : cropped
3637px x 1024px : ok
3638px (and above) x 1024px : cropped

I tried to reproduce that on the PG, and the values are not the same:

3500px x 2368px : ok
3500px x 2369px (and above) : cropped
3536px x 2368px : ok
3537px (and above) x 2368px : cropped

The width around 3500 is an arbitrary value, you can put quite more if height is low enough (and vice versa).

I don't know if the values will be different on your devices, but you can test that with this PG : http://www.babylonjs-playground.com/#17HUVT#1

Is it expected behavior or a bug ?

Link to comment
Share on other sites

Yep, that would make sense, but there is also the fact that if we resize canvas without calling engine.resize(), the bug does not occur (but of course the 3d is then very pixelated).

I can't manage to reproduce it on the playground, I presume the PG environment automatically call engine.resize if changes in the layout are detected, I cannot bypass that to test more deeply.

Link to comment
Share on other sites

  • 3 weeks later...

@Deltakosh

I've created the test page for bugzilla, but before posting I'd like you to test something.

I noticed that the bug occurs only if engine.resize is called. So I've added a button to de/activate that, but I'm asking if I should remove this button or not. Maybe it could be disturbing for them to debug, or they could say that it is BJS related and not browser related.

What do you think ?

Link to comment
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...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...