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

How to enable antialias? #8

Open
niccolofanton opened this issue Jan 26, 2022 · 4 comments
Open

How to enable antialias? #8

niccolofanton opened this issue Jan 26, 2022 · 4 comments

Comments

@niccolofanton
Copy link

I can pass Partial<WebGLRenderer> to the ThCanvas but I can't figure out how to toggle the antialias flag. Is it possible in some way? Is there a way to get the renderer instance in a component?

@niccolofanton
Copy link
Author

niccolofanton commented Jan 26, 2022

A bit of context about this question: the render was a bit blurry and I was looking for the possible problem. After some research, I've discovered that it was caused by the pixelRatio property passed inside rendererParameters (it's not applied to the renderer apparently)

@demike
Copy link
Owner

demike commented Jan 26, 2022

You are right. PixelRatio is missing. There is a setter on the Renderer and this one is not called.

I will add the possibility to set it by means of the configuration object.

In the meantime you can get the renderer by means of
injecting the ThEngineService. It has a getter renderer and can be accessed in onInit or later

@demike
Copy link
Owner

demike commented Feb 26, 2022

I will implement automatic device pixelratio setting.
This will be done before rendering a frame, if the device pixel ratio changed ( imagine moving the window from one screen to a different screen ).

This should solve your problem. The above mentioned problem of a multi monitor setup with different ratios can't be solved with a static pixel ratio.

@demike
Copy link
Owner

demike commented Jun 23, 2022

automatic pixel ratio adjustment is implemented in v0.16.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants