Skip to content

Apply vertex shader #329

Answered by asny
huand asked this question in Q&A
Feb 23, 2023 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

That's a good question, I have several suggestions:

  • You can change the positions in the vertex shader (as I think you are suggesting) which is only limited by the fact that you need to be able to compute the position in a vertex shader. For that, you can create a new Geometry type, for inspiration, you can take a look at the water implementation in water.rs and water.vert which uses exactly this approach to deform the waves. If you only want to use the core module, then, yes, you need to create a Program which deforms the vertex positions in the vertex shader.
  • You might be able to do it with morph targets (#308), where the data is transferred once to the GPU, but it requires that there's…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@huand
Comment options

@asny
Comment options

Answer selected by huand
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants