-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Document new shader built-ins (node position, camera pos/dir) #6022
Conversation
You can delete the examples you added before that overlap with these now |
@clayjohn 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👍🏻 |
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 |
@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 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 ```
@mhilbrunner Done, I think :D And no problem. My bad for not noticing it. Thanks for the quick feedback! |
Thanks for the quick turnaround, and thank you for contributing to Godot's docs, it's appreciated! ❤️🎉 |
Following up on this PR: godotengine/godot#63597
Documents the new shader built-ins introduced by this PR.