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

Docs: Add instanceMatrix to shader documentation #20293

Merged
merged 1 commit into from
Sep 8, 2020

Conversation

Adjective-Object
Copy link
Contributor

This change documents some speed bumps I ran into while trying to write a shader for instanced objects.
There are enough levels of indirection in reading the ShaderChunks source that figuring out how instanceMatrix is used was too difficult for me.
Thankfully someone wrote a medium article on the topic, but it took a lot of searching after bouncing off the official documentation.

As someone who has not done much work in shaders before, an explanation of how instanceMatrix is typically consumed was also helpful, so I included that as well.

This change documents some speed bumps I ran into while trying to write a shader for instanced objects. There are enough levels of indirection in reading ShaderChunks from source that figuring out how instanceMatrix is used there was too difficult for me.
Thankfully someone wrote [a medium article](https://medium.com/@pailhead011/instancing-with-three-js-36b4b62bc127) on the topic, but it took a lot of searching after bouncing off the official documentation.

As someone who has not done much work in shaders before, an explanation of what the instanceMatrix maps between and how it is typically consumed was also helpful, so I included that as well.
@mrdoob mrdoob added this to the r121 milestone Sep 8, 2020
@mrdoob mrdoob changed the title Add instanceMatrix to shader documentation Docs: Add instanceMatrix to shader documentation Sep 8, 2020
@mrdoob mrdoob merged commit be0a6d6 into mrdoob:dev Sep 8, 2020
@mrdoob
Copy link
Owner

mrdoob commented Sep 8, 2020

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants