본문 바로가기
반응형

컴퓨터 그래픽스17

OpenGL Shading Language (셰이딩) GLSL_(3) OpenGL Shading Language Transformation of Surface Normals The modelview matrix transforms vertices from the local coordinate system to the camera coordinate system A later application of illumination models requires that the surface normal of each vertex is also transformed from the local coordinate system to the camera coordinate system So far, the fixed-function pipeline has taken care of the .. 2023. 6. 18.
OpenGL Shading Language (셰이딩) GLSL_(2) OpenGL Shading Language Passing of Vertex Attributes Per-Vertex attributes can be passed to a vertex shader using in variables Distinctions can be made regarding special in variables, which are automatically generated, and user-defined in variables, which must be passed by the application The vertex data is transferred to the graphics card via Vertex Buffer Objects (VBOs) To use the data of VBOs.. 2023. 6. 17.
OpenGL Shading Language (셰이딩) GLSL_(1) OpenGL Shading Language OpenGL Shading Language The OpenGL Shading Language (GLSL) allows writing custom programs for vertex and fragment processors The custom GLSL programs thereby replace parts of the OpenGL pipeline that were previously performed by the fixed-function pipeline The per-vertex-operations are partially replaced by a vertex shader and the per-pixel-operations by a fragment shader.. 2023. 6. 17.
버퍼 오브젝트 (Buffer Objects) (3) Importing 3D Geometry Importing 3D Geometry In the VBO examples presented so far, vertex data was either generated randomly or was specified by hand In practice, however, 3D models are typically created in a 3D modeling software, such as Blender, 3DS Mas, Maya, Cinema 4D, etc. A relatively simple and popular file format for the exchange of 3D models is the Wavefront OBJ format The OBJ file forma.. 2023. 6. 17.
버퍼 오브젝트 (Buffer Objects) (2) Buffer Objects Stride and Start Address Often different vertex attributes (such as position, color, etc.) are not stored separately, but in a common data structure that is created for each vertex, for example: struct Vertex { float position[3]; float color[4]; float texCoord[2]; float normal[3]; }; std::vector vertexData; If vertexData is created as one large VBO, memory access to the individual.. 2023. 5. 29.
버퍼 오브젝트 (Buffer Objects) (1) Buffer Objects Buffer Objects Until now, a large number of function calls were needed for drawing graphics primitives (such as polygons, lines, or points) //... glColor3f(1.0f, 1.0f, 0.0f); glBegin(GL_POLYGON); glTexCoord2f(0.25f, 0.50f);glVertex3f(-1.0f, 1.0f, 1.0f); glTexCoord2f(0.25f, 0.25f);glVertex3f(-1.0f, -1.0f, 1.0f); glTexCoord2f(0.50f, 0.25f);glVertex3f(-1.0f, -1.0f, 1.0f); glTexCoord2.. 2023. 5. 29.
반응형