본문 바로가기

College Study77

[Research] What is Computer Graphics? Q1. What is the difference between ‘Graphic’ and ‘Graphics’? ‘Graphic’ is a word for refering concepts. CG, images being made on the screens and designed stuff. They are all called ‘Graphic’. ‘Graphics’ is a word for refering a field of study. ‘Graphics’ is a field of studying ‘Graphic’. Similarly, Economics is a field of studying Economy. Q2. What is the difference between Graphics and Image pr.. 2022. 8. 29.
(Draft) Texture Mapping, 3D Models, Lighting * 이 게시물은 추후 archive될 예정입니다. 5.1 Loading Texture Image Files 5.2 Texture Coordinates 5.3 Creating a Texture Object 5.4 Constructing Texture Coordinates 5.5 Loading Texture Coordinates into Buffers 5.6 Using the Texture in a Shader: Sampler Variables and Texture Units 5.7 Texture Mapping: Example Program 5.8 Mipmapping 5.9 Anisotropic Filtering 5.10 Wrapping and Tiling 5.11 Perspective Distortion .. 2022. 3. 10.
(Draft) Managing 3D Graphics Data : Highlights & Codes * 이 게시물은 추후 archive될 예정입니다. a buffer to a vertex attribute directly to a uniform variable 4.1 Buffers and Vertex Attributes init() display() Vertex Buffer Object Vertex Array Object one will be sufficient GLuint vbo[2]; glGenBuffers(2, vbo); We store those IDs in the integer arrays vao and vbo. Vertex attributes are generally the first variables declared in a shader. this vertex attribute will b.. 2022. 3. 10.
[그래픽스] 투영 행렬, Look-At 행렬, GLSL 변환 행렬 함수 (Projection Matrices, Look-At Matrices, GLSL Functions for Transformation Matrices) * 이 게시물은 Computer Graphics Programming in OpenGL with C++ 책의 일부를 번역 및 재해석한 게시물입니다. 의역 또는 오역이 있을 수 있으니 참고하시고, 피드백은 댓글을 남겨주세요. 투영 행렬 (Projection Matrices) 우리가 카메라를 설치하였기 때문에, 프로젝션 행렬을 검토할 수 있습니다. 우리가 이제 검토할 두 가지 중요한 프로젝션 행렬은 원근(perspective)과 직교(orthographic)입니다. 1. 원근 투영 행렬 (Perspective Projection Matrices) 원근 투영은 원근의 개념을 활용함으로써 우리가 현실 세계를 볼 때 보는 것을 모방하여 2D 그림을 3D처럼 보이게 합니다. 가까운 오브젝트는 멀리 떨어져 있는 오브.. 2022. 3. 7.
[그래픽스] 공간(Local Space, World Space, Eye Space) 간 변환 * Computer Graphics Programming in OpenGL with C++ 책을 참고하였습니다. * 책을 번역한 것이 아닌, 제가 독학 후 책을 참고하여 설명하는 게시물입니다. 따라서 책에 없는 부연 설명이 있기도 하며, 의역 또는 오역, 오개념이 있을 수 있습니다. 피드백은 댓글을 남겨주세요. * 영어 용어를 최대한 한국어로 번역하지 않습니다. 처음부터 코드에서 사용되는, 또는 원서나 인터넷에서 사용되는 보편적 용어를 사용하여 개념을 잡는 것을 추천드립니다. Local Space OpenGL 또는 다른 프레임워크들로 3D 그래픽스를 사용하는 목적은 주로 3차원의 세상을 구현하고 그 속에 오브젝트를 배치하여 모니터로 보는 것입니다. 3D 오브젝트 모델을 처음 생성할 때에는, 모델을 가장 .. 2022. 3. 2.
[GLSL] Fractal Brownian Motion https://thebookofshaders.com/13/ The Book of Shaders Gentle step-by-step guide through the abstract and complex universe of Fragment Shaders. thebookofshaders.com float amplitude = 1.; float frequency = 1.; y = sin(x * frequency); float t = 0.01*(-u_time*130.0); y += sin(x*frequency*2.1 + t)*4.5; y += sin(x*frequency*1.72 + t*1.121)*4.0; y += sin(x*frequency*2.221 + t*0.437)*5.0; y += sin(x*freq.. 2022. 1. 6.
[GLSL] Voronoi https://thebookofshaders.com/12/ The Book of Shaders Gentle step-by-step guide through the abstract and complex universe of Fragment Shaders. thebookofshaders.com #ifdef GL_ES precision mediump float; #endif uniform vec2 u_resolution; uniform vec2 u_mouse; void main(){ vec2 coord = gl_FragCoord.xy/u_resolution; coord.x *= u_resolution.x/u_resolution.y; vec2 mouse = u_mouse.xy/u_resolution; mouse.. 2022. 1. 6.
[GLSL] Gradient Noise https://thebookofshaders.com/11/ The Book of Shaders Gentle step-by-step guide through the abstract and complex universe of Fragment Shaders. thebookofshaders.com #ifdef GL_ES precision mediump float; #endif uniform vec2 u_resolution; // vec2 vec2 random vec2 random(vec2 st){ float x = fract(sin(dot(st*25., vec2(17.34,50.13)))*84239.523); float y = fract(cos(dot(st*25., vec2(28.13,39.49)))*94820.. 2022. 1. 6.
[GLSL] Value Noise https://thebookofshaders.com/11/ The Book of Shaders Gentle step-by-step guide through the abstract and complex universe of Fragment Shaders. thebookofshaders.com Vec2-float noise. #ifdef GL_ES precision mediump float; #endif uniform vec2 u_resolution; float random(vec2 st){ float c = fract(sin(dot(st*25., vec2(17.34,50.13)))*84239.523); return c; } float noise(vec2 st){ vec2 i = floor(st); vec2.. 2022. 1. 6.