Skip to content

Examples of matrix input usage in Spatial Shaders#5895

Merged
mhilbrunner merged 1 commit intogodotengine:masterfrom
paddy-exe:matrices-usage-examples
Jul 19, 2022
Merged

Examples of matrix input usage in Spatial Shaders#5895
mhilbrunner merged 1 commit intogodotengine:masterfrom
paddy-exe:matrices-usage-examples

Conversation

@paddy-exe
Copy link
Contributor

@paddy-exe paddy-exe commented Jun 29, 2022

Introduces examples for matrix input usage to users in Spatial Shaders such as:

  • object's world space position
  • camera's world space position
  • camera eye vector in world space direction of the camera
  • camera's view direction to the object in view space

@paddy-exe
Copy link
Contributor Author

@clayjohn I incorporated your feedback in and moved the code together directly above the Fragment built-ins. I did leave the note about the MODEL_VIEW_MATRIX there though since it seems quite useful to know. Let me know what you think about this.

@paddy-exe paddy-exe marked this pull request as ready for review June 30, 2022 08:17
Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks!

Copy link
Member

@mhilbrunner mhilbrunner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very small nitpick, otherwise looks perfect!

Copy link
Member

@mhilbrunner mhilbrunner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick update, and good work on this PR :)

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