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

Consider handling transformations #4

Open
grovesNL opened this issue May 10, 2022 · 3 comments
Open

Consider handling transformations #4

grovesNL opened this issue May 10, 2022 · 3 comments

Comments

@grovesNL
Copy link
Owner

Consider handling scale, shear, rotation, etc., at least for typical 2D use cases

Also related to #3 because pixel snapping wouldn't work well depending on the transformation.

@mfluehr
Copy link

mfluehr commented Jan 14, 2025

Personally, I mostly care about translation.

I'm building a 2D game that has a moving camera. I would like a way to apply a single camera to all TextAreas within a given TextRenderer. Currently, I have to manually update every single TextArea whenever the camera moves, which is inconvenient. I'd much rather leave them unchanged, and apply a single shader matrix to move everything at once.

To summarize, it seems there are two separate needs for this issue:

  1. Transform individual TextAreas, as in Add TextArea.transform #64.
  2. Transform TextRenderers, as in my use case.

@grovesNL
Copy link
Owner Author

Do you just want a convenient way to apply translation across all text areas, or does it need to happen in the shader itself? I'm just curious because we currently rely on having the coordinates on the CPU so we can clip/cull before it reaches the shader.

@mfluehr
Copy link

mfluehr commented Jan 14, 2025

The advantage of GPU-side is that only the camera values need to change and all the text areas can stay the same. But your point about culling CPU-side is a good one, so that might be the best way. Mostly I'm looking for convenience here.

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