Timeline for How to use texelFetch
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 16, 2020 at 10:15 | history | edited | CommunityBot |
Commonmark migration
|
|
Oct 30, 2016 at 14:50 | comment | added | BlueMonkMN |
It turns out that VertexAttribIPointer does work in my edit to the question, but, because ivec2 must be flat (according to compiler errors I was getting), will only allow a single texture pixel color to be used for a whole primitive. Therefore I decided to abandon VertexAttribIPointer and just postpone the type-casting to ivec2 until immediately before texelFetch.
|
|
Oct 30, 2016 at 12:54 | comment | added | BlueMonkMN |
All the overloads of GL.VertexAttribIPointer take IntPtr or references to a generic type. I don't understand how to specify the offset in those terms.
|
|
Oct 30, 2016 at 12:48 | comment | added | Maximus Minimus | @BlueMonkMN - the part you're missing is that these data types are also converted to floats when using glVertexAttribPointer; to have them left as integers you must use glVertexAttribIPointer. | |
Oct 30, 2016 at 1:58 | comment | added | BlueMonkMN | I'm confused because the documentation at opengl.org/sdk/docs/man4/html/glVertexAttribPointer.xhtml says "Specifies the data type of each component in the array. The symbolic constants GL_BYTE, GL_UNSIGNED_BYTE, GL_SHORT, GL_UNSIGNED_SHORT, GL_INT, and GL_UNSIGNED_INT are accepted by glVertexAttribPointer and glVertexAttribIPointer." And the normalized parameter controls whether values are normalized: "For glVertexAttribPointer, specifies whether fixed-point data values should be normalized (GL_TRUE) or converted directly as fixed-point values (GL_FALSE) when they are accessed." | |
Oct 29, 2016 at 19:05 | history | answered | Maximus Minimus | CC BY-SA 3.0 |