드디어 제일 처음 Section인 “Getting Started”를 다 읽고 예제 코드를 정리하였다. 이번 포스터에는 “Lighting Section”의 예제 코드를 GLES 버전으로 정리하였다. 삼성 갤럭시 S9 제품에서 정상적으로 동작하는 것을 확인한 코드이다.
예제 코드 사이트 정리
- Getting Started Section 예제 코드: https://mkblog.co.kr/2018/10/14/opengl-es-getting-started-section-example-code/
- Lighting Section 예제 코드: https://mkblog.co.kr/2018/11/08/opengl-es-lighting-section-example-code/
GLES Lighting Section 예제 코드 정리
- (Ch12) Object and Light Source Fragment Shader: 한개의 Light Source와 Object를 그리는 예제 코드
- (Extra) Sphere Light Source: 기존 코드는 Cube 모양의 Light Source를 Sphere 모양의 Light Source로 변경한 예제 코드 (출처 2)
- (Ch13) Ambient Light: Ambient Light을 추가한 예제 코드
- (Ch14) Diffuse Lighting: Diffuse Light을 추가한 예제 코드
- (Ch14) Specular Lighting: Specular Light를 추가한 예제 코드
출처
- https://learnopengl.com/
- http://www.songho.ca/opengl/gl_sphere.html