-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Rename Camera3D.project_position()
to Camera3D.viewport_to_world()
#59592
Conversation
`Camera3D.unproject_position()` was also renamed to `Camera3D.world_to_viewport()`. The `screen_point` parameters to various Camera3D methods were also renamed to `viewport_point` to be more explicit. This wording is less technically accurate, but it is much more obvious, especially for those less familiar with 3D rendering.
4ead032
to
b588b31
Compare
Heck yeah, I always confuse project() and unproject() - the only place where I got them to work was somebody else's code from a tutorial :P |
I'm not sure about this change. I can see that the current naming is very confusing to users. But the suggested naming comes from the naming scheme that I suggested for shaders which was rejected by other contributors in the Rocketchat rendering channel and in a subsequent PR review meeting. Accordingly, the |
We've discussed this in a PR meeting, and in general weren't against the idea. But given there is a comment from Clay, let's put it to discussion in one of the rendering team meetings. Also the renames need to be added to the conversion tool before the merge. |
The alternative would just be switching unproject/project. As I said, everyone else is using these terms in their opposite meaning (#54161 (comment)). It goes so clearly (and lonely) against convention that I'd consider it a bug; and at least this computer graphics professor @seichter does so as well: #54161 (comment).
I just realized you actually fixed the shader builtins by just switching their names: #59268 Awesome, that would have also been my preferred solution. But then it's only logical to also switch unproject/project and refrain from the x_to_y naming scheme. |
We definitely need to find a way to fix |
Camera3D.unproject_position()
was also renamed toCamera3D.world_to_viewport()
. Thescreen_point
parameters to various Camera3D methods were also renamed toviewport_point
to be more explicit.This wording is less technically accurate, but it is much more obvious, especially for those less familiar with 3D rendering.
See #54161 (comment).