Skip to content

Examples of matrix input usage in Spatial Shaders - #5895

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

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

Conversation

@paddy-exe

@paddy-exepaddy-exe commented Jun 29, 2022

Copy link
Copy Markdown
Contributor

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

Comment threadtutorials/shaders/shader_reference/spatial_shader.rst Outdated
Comment threadtutorials/shaders/shader_reference/spatial_shader.rst Outdated
Comment threadtutorials/shaders/shader_reference/spatial_shader.rst Outdated
Comment threadtutorials/shaders/shader_reference/spatial_shader.rst Outdated
@paddy-exe

Copy link
Copy Markdown
ContributorAuthor

@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
Comment threadtutorials/shaders/shader_reference/spatial_shader.rst Outdated
Comment threadtutorials/shaders/shader_reference/spatial_shader.rst Outdated
Comment threadtutorials/shaders/shader_reference/spatial_shader.rst Outdated

@clayjohnclayjohn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great! Thanks!

@mhilbrunnermhilbrunner left a comment

Copy link
Copy Markdown
Member

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!

Comment threadtutorials/shaders/shader_reference/spatial_shader.rst Outdated

@mhilbrunnermhilbrunner left a comment

Copy link
Copy Markdown
Member

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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@paddy-exe@mhilbrunner@clayjohn@Calinou