Is it possible to access a vertex buffer in a fragment shader using a sampler1D in Opengl 3.0>? I think I read about it in the past, but I can't find anything about it. I can render the data to a texture, but it wouldn't be very elegant code, if a more explicit way is available.
Yes, this is called Texture Buffer Object (TBOs), it's available as a Core OpenGL feature in 3.3 (i think) or as an ARB extension, for more information check the extension specification:
http://www.opengl.org/registry/specs/ARB/texture_buffer_object.txt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With