-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Controlling the canvas resolution #41
Comments
Right now you can control the window resolution with https://github.com/darthdeus/comfy/blob/master/comfy/examples/custom_config.rs, but unfortunately specifying resolution for the render target is not possible. It would be possible to do this with a custom post processing shader where you effectively "downscale" back to what your canvas resolution would be, which should give "close enough" results. This should be possible soon, as custom user post processing is a bit buggy but will be fixed probably next week. The ability to specify render target resolution (which is what I think you're asking for) is a bit more involved, and I don't know if I can just "solve it" off the top of my head, but I'll look into it after the major problems are fixed (maybe a week later). I don't expect this to be too difficult, but it will affect a few things and will need more testing. I'm definitely not opposed to it, imo pixel perfect games are very much in the target market and comfy should be able to support them. That being said, I don't think the problem is in All this being said, pixel perfect is a complex topic, it's possible I missed something, please do let me know what works/doesn't. While Comfy's philosophy is to remain simple, that doesn't prevent us from allowing more custom behavior when a user desires it. This is also somewhat related to #18. |
Thanks, I'm glad to hear that it's in the roadmap. I'm not really looking for a pixel-perfect solution right now (haven't tested how well it performs on that aspect), but pixel-perfect support would definitely be great. I don't mind a few imperfect pixels here and there for now, but I'm just looking a way to simulate a low resolution canvas scaled up. I think your idea of a downscale filter might work. But for reference about pixel-perfect struggles, there's this big thread on Godot about it (Godot 4 is currently not capable of performing pixel-perfect scaling): godotengine/godot-proposals#6389. Maybe you might find it useful for implementing it. |
Right now all
draw_*
(draw_circle
,draw_line
, etc.) functions draws at 1:1 resolution, as in each logical pixel maps to a single physical pixel. This is a problem when you want to achieve a consistent pixelated look.I know this might not be aligned with comfy's philosophy, but maybe allow the user to specify the resolution/DPI of the canvas directly? This way all drawing functions will automatically have a consistent look.
The text was updated successfully, but these errors were encountered: