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

A question of render.cs #10

Closed
UMR19 opened this issue May 26, 2022 · 2 comments
Closed

A question of render.cs #10

UMR19 opened this issue May 26, 2022 · 2 comments

Comments

@UMR19
Copy link

UMR19 commented May 26, 2022

image
in render.cs there's vec2 variable called imgPos, i don't know why it times 0.5 and plus 0.5, what does it mean?
Thank you very much if you can answer my questions. : )

@m-schuetz
Copy link
Owner

At this point, x and y are in normalized device coordinates, i.e., between -1 and 1. We need them between 0 and 1, then multiply them by the image size to get the pixel coordinates.

@UMR19
Copy link
Author

UMR19 commented May 26, 2022

thanks for your answer, I finally know the meaning of this. :)

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