Skip to content

Provide a example about how to use ArrayState #701

Answered by robertosfield
MasonAlice asked this question in Q&A
Discussion options

You must be logged in to vote

ArrayState is essentially helper class for handling scene graphs that use vertex shaders that process vertices in non standard ways i,e move the vertices around in ways that are as simple as modelmatrix * vertex. They provide a form CPU emulation of vertex shader so CPU routines can process vertex and primitive data without knowing the details of every possible shader combination.

There isn't an vsgExamples example of using vsg::ArrayState, but both the vsg::ComputeBounds and vsg::LineSegmentIntersector implementations found in the VulkanSceneGraph use it so may be helpful.

There are also implementations of custom ArrayState provided by the built in ShaderSets to handle shaders that move …

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by robertosfield
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@robertosfield
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #700 on January 17, 2023 09:23.