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

Document new shader built-ins (node position, camera pos/dir) #6022

Merged
merged 1 commit into from
Aug 5, 2022
Merged

Document new shader built-ins (node position, camera pos/dir) #6022

merged 1 commit into from
Aug 5, 2022

Conversation

paddy-exe
Copy link
Contributor

Following up on this PR: godotengine/godot#63597
Documents the new shader built-ins introduced by this PR.

NODE_POSITION_WORLD = Node world space position
NODE_POSITION_VIEW = Node view position
CAMERA_POSITION_WORLD = Camera world space position
CAMERA_DIRECTION_WORLD = Camera world space direction

@clayjohn
Copy link
Member

clayjohn commented Aug 2, 2022

You can delete the examples you added before that overlap with these now

@paddy-exe
Copy link
Contributor Author

@clayjohn I generally agree but wouldn't it still make sense to keep them so people understand what happens "under the hood"?

@Calinou
Copy link
Member

Calinou commented Aug 2, 2022

I generally agree but wouldn't it still make sense to keep them so people understand what happens "under the hood"?

I think the new constants can have a note of the form: "Equivalent to (whatever formula is used behind the scenes)"

@paddy-exe
Copy link
Contributor Author

paddy-exe commented Aug 3, 2022

I generally agree but wouldn't it still make sense to keep them so people understand what happens "under the hood"?

I think the new constants can have a note of the form: "Equivalent to (whatever formula is used behind the scenes)"

That is a great idea👍🏻

@clayjohn
Copy link
Member

clayjohn commented Aug 3, 2022

I generally agree but wouldn't it still make sense to keep them so people understand what happens "under the hood"?

I don't think its helpful for users to have that detail in the docs if we don't expect them to use it. When writing documentation it is important to show the "right" way of doing things. If we show them the right way and a wrong way it will lead to confusion.

If this was a long-form tutorial and not a reference doc I would agree with you as long as we put a sufficient explanation as it would be a good learning opportunity. But since this is a reference doc we should keep it as streamlined as possible

@paddy-exe
Copy link
Contributor Author

@clayjohn I updated the docs to your feedback (+ rebased everything). I understand your position now. Thanks for the explanation. Perhaps then there should be a specific explanation site in the shaders section just for these matrices.

@paddy-exe paddy-exe requested a review from mhilbrunner August 5, 2022 18:55
@mhilbrunner
Copy link
Member

@paddy-exe Looking good now :) Last minor nitpick: can you add a '.' to the end of the descriptions for consistency with the existing ones? Then I'll merge it, promise :P Sorry I missed that before. Good work!

Following up on this PR: godotengine/godot#63597
Documents the new shader built-ins introduced by this PR.
```
NODE_POSITION_WORLD = Node world space position
NODE_POSITION_VIEW = Node view position
CAMERA_POSITION_WORLD = Camera world space position
CAMERA_DIRECTION_WORLD = Camera world space direction
```
@paddy-exe
Copy link
Contributor Author

@mhilbrunner Done, I think :D And no problem. My bad for not noticing it. Thanks for the quick feedback!

@mhilbrunner mhilbrunner removed the request for review from clayjohn August 5, 2022 19:33
@mhilbrunner mhilbrunner merged commit f8ffad0 into godotengine:master Aug 5, 2022
@mhilbrunner
Copy link
Member

Thanks for the quick turnaround, and thank you for contributing to Godot's docs, it's appreciated! ❤️🎉

@paddy-exe paddy-exe deleted the document-new-built-ins branch September 7, 2022 12:34
paddy-exe added a commit to paddy-exe/godot-docs that referenced this pull request Sep 7, 2022
paddy-exe added a commit to paddy-exe/godot-docs that referenced this pull request Sep 7, 2022
paddy-exe added a commit to paddy-exe/godot-docs that referenced this pull request Sep 7, 2022
paddy-exe added a commit to paddy-exe/godot-docs that referenced this pull request Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants