Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Container.cacheAsBitmap behaving funny on retina #2393

Closed
nuthinking opened this issue Mar 13, 2016 · 8 comments
Closed

Container.cacheAsBitmap behaving funny on retina #2393

nuthinking opened this issue Mar 13, 2016 · 8 comments

Comments

@nuthinking
Copy link

almost as if the snap shot wasn't retina. I am developing for an Android TV, sorry if the pictures below are not ideal (without and with cacheAsBitmap).

cacheasbitmap

FYI Android TV is considered Retina (small window size in pixels but double density). I used the rendererOptions.resolution = window.devicePixelRatio and canvas style size = window size option to support it.

@nuthinking
Copy link
Author

On the laptop, with technically the same resolution (full hd) looks way more readable (ok, this is a screenshot, not a photo).

laptop

So I guess I am doing also something wrong managing the retina use case in the first place.

@nuthinking
Copy link
Author

Here Canvas 2D (left) VS Pixi (right).

img_0659_cropped

I guess this is the price of using 3d rendering. On the TV the difference is much more noticeable.

@GoodBoyDigital
Copy link
Member

hey there! if you use the pixi canvas renderer, does the text show up sharp?

@nuthinking
Copy link
Author

Hi @GoodBoyDigital, I tried new PIXI.CanvasRenderer and as a matter of fact the difference in rendering quality is still there!

Here the pen: http://codepen.io/anon/pen/NNbdJY

It should be enough to check it on an iphone.

img_0660

Thanks!

@nuthinking
Copy link
Author

@GoodBoyDigital thanks to @ivanpopelyshev I discovered the "resolution" parameter in PIXI.Text. The documentation doesn't seem updated: https://pixijs.github.io/docs/PIXI.Text.html

This solved the quality of text in general. Still cacheAsBitmap makes the text worse. I updated the pen (had some problem with embedded font)

@GoodBoyDigital
Copy link
Member

oh, one more to try:

PIXI.RESOLUTION = 2

as pix may be using a lower resolution texture to cache the text. - side note here but there should not be a situation where you would need to use cacheAsBitmap on text as it essentially a bitmap anyway.

hope that does the trick!

@nuthinking
Copy link
Author

@GoodBoyDigital updated the pen, seems to work. Thanks! ;) Anyway, I was thinking of using cacheAsBitmap for a composition of more elements.

@lock
Copy link

lock bot commented Feb 25, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Feb 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants