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

FixedIntegerResolutionViewport for the CameraComponent #2810

Open
spydon opened this issue Oct 11, 2023 · 2 comments
Open

FixedIntegerResolutionViewport for the CameraComponent #2810

spydon opened this issue Oct 11, 2023 · 2 comments

Comments

@spydon
Copy link
Member

spydon commented Oct 11, 2023

Problem to solve

When migrating to the CameraComponent an experimental feature called FixedIntegerResolutionViewport was removed, it would be great to re-create this viewport for the CameraComponent.

Proposal

Create FixedIntegerResolutionViewport for the CameraComponent.

More information

This is the old PR for this: #1866

@Arthurlima544
Copy link

Hi @spydon what you expect that FixedIntegerResolutionViewport do?

As I understand this it should deal better on Pixel Art games, that's why has a Fixed Pixel Ratio on 1.0, right?

But still not clear for me why we need to create a specific class for that, If we do a FixedResolutionViewport(resolution: Vector2(1,1)) wouldn't work that same as you are proposing?

I would love to be able to understand better and contribute to the project, if you have a little patience to explain, I would appreciate it.

@spydon
Copy link
Member Author

spydon commented Oct 13, 2023

Hi @spydon what you expect that FixedIntegerResolutionViewport do?

When it scales the viewport or should only scale so that the size is corresponding to real integer pixel values.

As I understand this it should deal better on Pixel Art games, that's why has a Fixed Pixel Ratio on 1.0, right?

What do you mean with "fixed pixel ratio on 1.0"?
Yeah, it would work a bit better on pixel art games, but first and foremost it was built to avoid a anti-alias bug in non-impeller rendering (#1152).

But still not clear for me why we need to create a specific class for that, If we do a FixedResolutionViewport(resolution: Vector2(1,1)) wouldn't work that same as you are proposing?

That wouldn't work, that would only show one single pixel on the whole screen, and you also want to be able to have different aspect ratios.

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

No branches or pull requests

2 participants