Skip to content

Storing computations of vertex shader in buffer #6698

Answered by bejado
noergel1 asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, you can store any computation you want inside vertex attributes. We provide 8 attributes for your own use: custom0-7. Then, in the material you can mark them as "required" and access them via getCustom0(). https://google.github.io/filament/Materials.html#materialdefinitions/materialblock/vertexandattributes:requires

Note that these attributes must be computed on the CPU.

Replies: 1 comment 2 replies

Comment options

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

@bejado
Comment options

Answer selected by noergel1
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