Attributes

Attributes are input variables that are used in the vertex shader. Attributes are used to specify how to pull data out of buffers and provide them to the vertex shader. For example, you may put positions in a buffer as three 32-bit floats per position. You would tell a particular attribute which buffer to pull the positions out of, what type of data it should pull out (3-component, 32-bit floating point numbers), what offset in the buffer the positions start at, and how many bytes to get from one position to the next. Since the vertex shader is called on each vertex, the attributes will be different every time the vertex shader is invoked.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.243.32