1 minute read

다각형 메쉬를 렌더링할 때는 많은 정보를 지정해야 한다. 전통적으로 우리는 각 정점의 position, 법선 벡터(normal vector), 그리고 텍스터 좌표와 같은 것을 지정한다. 또한 transformation matrices(변환 행렬), lighting(조명) 그리고 material 속성과 환경의 다른 속성, 그리고 아마 다양한 렌더링 옵션인 extra clipping planes, blending information, 등 을 지정한다.

위의 정보 중 일부는 정점마다 다른 값을 갖는데, 이러한 vertext에 대한 정보의 조각을 vertex attribute라고 한다.

=> vertex 속성은 삼각형을 이루는 3개의 점에서 삼각형을 가로질러 보간된 값이다. 즉, 텍스처 좌표, 법선, 색상 등의 것을 말한다.


A vertex attribute is an input variable to a shader that is supplied with per-vertex data. In OpenGL core profile, they are specified as in variables in a vertex shader and are backed by a GL_ARRAY_BUFFER. These variable can contain, for example, positions, normals or texture coordinates. A vertex attribute is an input variable to a shader that is supplied with per-vertex data. In OpenGL core profile, they are specified as in variables in a vertex shader and are backed by a GL_ARRAY_BUFFER. These variable can contain, for example, positions, normals or texture coordinates.

정점 속성은 정점별 데이터와 함께 제공되는 셰이더에 대한 입력 변수입니다. OpenGL 코어 프로필에서 버텍스 셰이더의 변수로 지정되고 GL_ARRAY_BUFFER에 의해 지원됩니다. 이러한 변수는 예를 들어 위치, 법선 또는 텍스처 좌표를 포함할 수 있습니다.

이러한 느낌이 아닐까 싶다. image

https://www.youtube.com/watch?v=x0H--CL2tUI

https://www.youtube.com/watch?v=8fy8uRv9PdM

https://www.reddit.com/r/opengl/comments/91jcnf/what_is_a_vertex_attribute_in_opengl/

https://stackoverflow.com/questions/44870049/what-exactly-is-a-vertex-attribute

https://www.haroldserrano.com/blog/what-is-the-purpose-of-a-vertex-attribute-in-opengl