Jump to content

CreateScreenshotUsingRenderTarget and anti-aliasing


Recommended Posts

I've looked through a couple of threads for this (some seem to be older and use a different method for taking screen shots), but haven't found a simple answer.

Is there a way to anti-alias screenshots? I'm using CreateScreenshotUsingRenderTarget and have played with setting the samples to various numbers, but it doesn't seem to have any effect.

Image on the left is rendered with samples = 16; on the right samples = 1.



Link to comment
Share on other sites

Tools.CreateScreenshot is returning an entirely transparent image:







I found this thread: 

 but there seems not to be a resolution. 


Link to comment
Share on other sites

21 minutes ago, brianzinn said:

In my PG there is antialiasing issue - did I not make the sample large enough or is it because of GUI (or something else)?

You did not devine the number of samples in your PG.
I fixed it in line 64 here: https://www.babylonjs-playground.com/#HJI09Z#2
I used 16 samples.

Link to comment
Share on other sites

I've done some digging and it seems that canvas.toDataURL() is the culprit. It's returning a blank png image. This isn't babylon.js's fault per se, but can anyone think why that might be happening? I get the same issue on chrome and firefox.


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.

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.


  • Recently Browsing   0 members

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