Is there any example of using shader storage buffers ? #3256
Answered
by
pezcode
abdullahoday710
asked this question in
Q&A
-
I need to use shader storage buffers to pass structs from c++ to the shader, In OpenGL I used to do it by using GL_SHADER_STORAGE_BUFFER but here I am lost, anyone can help me ? |
Beta Was this translation helpful? Give feedback.
Answered by
pezcode
Jul 16, 2024
Replies: 1 comment 3 replies
-
In bgfx you just use uniforms or compute buffers. See examples. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use a buffer in a vertex shader the same way you use it in a fragment shader.
I think the tesselation example matches what you want to do:
bgfx/examples/41-tess/vs_terrain_render.sc
Line 6 in e41cbeb