Hello i’m trying to understand how to get a better quality render for my game, in the web version i’m getting a little low quality renderings in the final game gui assets especially buttons and labels
all assets are scaled down versions (scaled trough the ide gui properties )
By the way the my display size configuration is 405 width x 720 height, the reason for that is that i wanted said dimensions on the web.
anything to change on that part?
On desktop you will get high dpi proper if you enable it in the project settings (high_dpi).
It is important though to understand that enabling this will create a high dpi buffer for rendering. All measurements stay the same. Any content that is rendered at 1x scale will look the same. But if you import high res images and scale them to 0.5x they will be high dpi on screen.
Check out:
If you do this right you will get crisp rendering on desktop. For HTML5, I am unsure how the support looks. @sven probably knows more.
Here is a quick explanation what I did to get the result in the last image;
Get the pixel ratio through JS; window.devicePixelRatio
Update the canvas width and height by multiplying the pixel ratio with the original width and height; <canvas width="original width * pixel ratio" height="original height * pixel ratio" ...>
Set the CSS width and height for the canvas element to the original width and height; #canvas { width: original-width px; height: original-height px; }
I think we should add this to the default html-export on our side of course, but you should be able to modify the HTML output to get the same result.