Skip to main content
gamedev.net
🔒 Locked

(GLSL) Can I use integer buffer?

Started by Hybrid3D 0 replies 1.1k views
Original Post
Hybrid3D
Hybrid3D
I'm trying to send the integer to each vertex shader, send it to fragment shader, and store it into integer buffer(size of screen). If I used 'float' instead of integer, I just send it through 'glVertexAttrib1f', store it in the AUX0(Auxiliary Buffer 0), and glReadPixels... But glVertexAttrib1i doesn't exist (but only exists glVertexAttrib1d for short type), and AUX0 is float buffer not integer... I'm implementing 'Radiosity'. I need to store element numbers(integer) of polygons in every rendering. How can I store the integer value into some buffer in Fragment Shader?
_______Imagination is more important than knowledge - Albert Einstein

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.