Article

Computer Game Architecture 2 - Illumination & Shaders, Textures

 Rendering pipeline : geometry & image as input (which is composed with triangle meshes) -> each vertex operations calculate position (transformations) & color (lighting) (by vertex shades in GPU) -> convert triangles into pixels by rasterization -> do fragment operation for each of pixels (by fragment shader, determine the color of pixel, done by vertex color's interpolation + image texture color) Illuminations - local illumination model(direct light) : only consider the point light source and the object reflecting the light. 그러나 현실에는 다른 곳에서 반사되어 눈에 들어오는 indirect light도 존재하므로 이는 현실을 나타내는 global illumination과는 차이가 있다. 그러나 빠른 계산을 위해 일반적으로 local만 고려한다. 또한 현실에서는 point light source는 존재하지 않으므로 area를 나타내기 위해 여러 point를 합쳐서 사용한다. - shading : determine the intensity of illumination of surface point (위에서 색을 정하는 방법) Approximate simple local illumination model = diffuse + specular + ambient - diffuse component : smooth change of illumination calculated based on Lambert's L