├── .nojekyll ├── resources ├── leaves.jpg ├── star.jpg ├── 8x8-font.png ├── eye-icon.png ├── keyboard.jpg ├── noodles.jpg ├── uv-grid.png ├── f-texture.png ├── mip-example.png ├── rotate-30.png ├── rotate-60.png ├── rotate-90.png ├── tdl │ ├── error.jpg │ ├── screenshot.js │ ├── log.js │ ├── fullscreen.js │ ├── fps.js │ ├── misc.js │ ├── buffers.js │ └── clock.js ├── images │ ├── frame.png │ └── computer-history-museum │ │ ├── neg-x.jpg │ │ ├── neg-y.jpg │ │ ├── neg-z.jpg │ │ ├── pos-x.jpg │ │ ├── pos-y.jpg │ │ └── pos-z.jpg ├── models │ ├── chair │ │ ├── chair.jpg │ │ ├── license.md │ │ └── chair.mtl │ ├── killer_whale │ │ ├── whale.png │ │ ├── thumbnail.jpg │ │ ├── whale.CYCLES.bin │ │ └── BLENDSWAP_LICENSE.txt │ ├── windmill │ │ ├── windmill-obj.jpg │ │ ├── windmill_001_base_COL.jpg │ │ ├── windmill_001_base_NOR.jpg │ │ ├── windmill_001_base_SPEC.jpg │ │ ├── windmill_001_lopatky_COL.jpg │ │ ├── windmill_001_lopatky_NOR.jpg │ │ ├── license.md │ │ └── windmill.mtl │ ├── book-vertex-chameleon-study │ │ ├── book.png │ │ └── LICENSE.md │ └── cube │ │ ├── cube.mtl │ │ ├── cube.obj │ │ └── offset-cube.obj ├── mip-low-res-example.png ├── f-texture-pixel-coords.png ├── css │ └── ui-lightness │ │ └── images │ │ ├── ui-icons_222222_256x240.png │ │ ├── ui-icons_228ef1_256x240.png │ │ ├── ui-icons_ef8c08_256x240.png │ │ ├── ui-icons_ffd27a_256x240.png │ │ ├── ui-icons_ffffff_256x240.png │ │ ├── ui-bg_flat_10_000000_40x100.png │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ ├── ui-bg_glass_100_f6f6f6_1x400.png │ │ ├── ui-bg_glass_100_fdf5ce_1x400.png │ │ ├── ui-bg_gloss-wave_35_f6a828_500x100.png │ │ ├── ui-bg_diagonals-thick_18_b81900_40x40.png │ │ ├── ui-bg_diagonals-thick_20_666666_40x40.png │ │ ├── ui-bg_highlight-soft_100_eeeeee_1x100.png │ │ └── ui-bg_highlight-soft_75_ffe45c_1x100.png ├── lesson-helper.css ├── glMatrix │ └── LICENSE.md ├── webgl-obj-loader │ ├── index.d.ts │ └── mesh.d.ts ├── stats.min.js ├── drag-and-drop.js ├── flattened-primitives.js ├── webgl-tutorials.css ├── polygon-f.svg ├── colResizable-1.3.min.js └── jquery.mousecapture.js ├── lessons ├── imgs │ ├── 23_pbr_result.png │ ├── 0_setup_devtool.JPG │ ├── 0_setup_result.JPG │ ├── 23_pbr_ctr_eqn.png │ ├── toc │ │ ├── 14_texture.JPG │ │ ├── 19_depth_map.JPG │ │ ├── 23_pbr_result.png │ │ ├── 10_using_matrix.JPG │ │ ├── 15_ambient_light.JPG │ │ ├── 16_diffuse_light.JPG │ │ ├── 17_specular_term.JPG │ │ ├── 02_shader_attribute.JPG │ │ ├── 03_draw_from_index.JPG │ │ ├── 04_shader_uniform.JPG │ │ ├── 07_buffer_abstraction.JPG │ │ ├── 13_model_abstraction.JPG │ │ ├── 18_light_abstraction.JPG │ │ ├── 22_shadow_mapping_pcf.JPG │ │ ├── 21_shadow_mapping_add_bias.JPG │ │ ├── 05_shader_uniform_interactive.JPG │ │ ├── 08_vertex_array_abstraction.JPG │ │ ├── 12_model_matrix_and_load_obj.JPG │ │ ├── 20_shadow_mapping_first_try.JPG │ │ ├── 06_drawing_multiple_objects_pt1.JPG │ │ ├── 06_drawing_multiple_objects_pt2.JPG │ │ ├── 09_shader_renderer_abstraction.JPG │ │ ├── 11_input_handling_color_change.JPG │ │ └── 11_input_handling_camera_control.JPG │ ├── 14_texture_result.jpg │ ├── 16_diffuse_light_dot.JPG │ ├── 19_depth_map_result.jpg │ ├── 15_ambient_light_result.JPG │ ├── 19_depth_map_far_plane.jpg │ ├── 19_depth_map_first_pass.jpg │ ├── 23_pbr_two_point_light.png │ ├── 5_shader_uniform_result.JPG │ ├── 16_diffuse_light_formula.JPG │ ├── 17_specular_light_result.JPG │ ├── 19_depth_map_created_FBO.jpg │ ├── 19_depth_map_default_FBO.jpg │ ├── 19_depth_map_second_pass.jpg │ ├── 23_pbr_single_point_light.png │ ├── 10_projection_matrix_devtool.jpg │ ├── 12_model_matrix_and_load_obj.JPG │ ├── 15_ambient_light_cull_only.JPG │ ├── 16_diffuse_light_ambient_0.0.JPG │ ├── 16_diffuse_light_ambient_0.2.JPG │ ├── 17_specular_light_unity_pbr.JPG │ ├── 17_specular_light_v_vector.JPG │ ├── 18_light_abstraction_result.JPG │ ├── 20_shadow_mapping_first_try.jpg │ ├── 21_shadow_mapping_add_bias.jpg │ ├── 22_shadow_mapping_pcf_result.jpg │ ├── 8_va_abstraction_rect_array.jpg │ ├── 11_input_handling_camera_space.jpg │ ├── 8_va_abstraction_rect_vertices.jpg │ ├── 11_input_handling_camera_setting.jpg │ ├── 11_input_handling_keyboardevent.jpg │ ├── 11_input_handling_window_object.jpg │ ├── 12_model_matrix_and_load_obj_raf1.JPG │ ├── 12_model_matrix_and_load_obj_raf2.JPG │ ├── 21_shadow_mapping_add_bias_result.jpg │ ├── 22_shadow_mapping_pcf_area_light.jpg │ ├── 22_shadow_mapping_pcf_hard_shadow.jpg │ ├── 22_shadow_mapping_pcf_point_light.jpg │ ├── 6_drawing_multiple_objects_result.JPG │ ├── 12_model_matrix_and_load_obj_teapot.JPG │ ├── 15_ambient_light_cull_only_problem.JPG │ ├── 20_shadow_mapping_first_try_result.jpg │ ├── 14_texture_texture_units_and_objects.png │ ├── 8_va_abstraction_rect_array_stride_offset.jpg │ └── 17_specular_light_result_dullmat_intensity_change.JPG ├── 24_toon_shading │ ├── TwoToneGradient.png │ ├── UtilToonGradient.png │ └── contents.html ├── _shaders │ ├── dirDepthmapFragment.js │ ├── simpleVertex.js │ ├── simpleFragment.js │ ├── basicProjectionFragment.js │ ├── basicViewProjectionFragment.js │ ├── textureFragment.js │ ├── dirDepthmapVertex.js │ ├── basicFragment.js │ ├── basicProjectionVertex.js │ ├── basicViewProjectionVertex.js │ ├── textureVertex.js │ ├── dirLightVertex.js │ ├── basicVertex.js │ ├── toonVertex.js │ ├── PBRShaderVertex.js │ ├── dirShadowBiasVertex.js │ ├── dirShadowPCFVertex.js │ ├── toonFragment.js │ ├── dirLightFragment.js │ ├── PBRShaderFragment.js │ ├── dirShadowBiasFragment.js │ └── dirShadowPCFFragment.js ├── _classes │ ├── Material.js │ ├── VertexBuffer.js │ ├── Renderer.js │ ├── IndexBuffer.js │ ├── BasicLight.js │ ├── VertexArray.js │ ├── Shader.js │ ├── OrbitCamera.js │ ├── Texture.js │ └── Model.js ├── 08_vertex_array_abstraction │ ├── contents.html │ └── main.js ├── 11_input_handling_pt1_color_change │ ├── contents.html │ └── main.js ├── 11_input_handling_pt2_camera_control │ ├── contents.html │ └── main.js ├── 09_shader_renderer_abstraction │ ├── contents.html │ └── main.js ├── 14_texture │ ├── contents.html │ └── main.js ├── 10_using_matrix │ ├── contents.html │ └── main.js ├── 15_ambient_light │ └── contents.html ├── 16_diffuse_light │ └── contents.html ├── 17_specular_term │ └── contents.html ├── 13_model_abstraction │ ├── contents.html │ └── main.js ├── 23_PBR │ └── contents.html ├── 12_model_matrix_and_load_obj │ ├── contents.html │ └── main.js ├── 18_light_abstraction │ └── contents.html ├── 19_depth_map │ └── contents.html ├── 22_shadow_mapping_pcf │ └── contents.html ├── 21_shadow_mapping_add_bias │ └── contents.html ├── 20_shadow_mapping_first_try │ └── contents.html ├── 00_Setup │ ├── contents.html │ └── README.md ├── 01_vertex_buffer │ └── contents.html ├── 04_shader_uniform │ ├── contents.html │ └── README.md ├── 02_shader_attribute │ └── contents.html ├── 05_shader_uniform_interactive │ └── contents.html └── 03_draw_from_index │ ├── README.md │ └── contents.html └── README.md /.nojekyll: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /resources/leaves.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/leaves.jpg -------------------------------------------------------------------------------- /resources/star.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/star.jpg -------------------------------------------------------------------------------- /resources/8x8-font.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/8x8-font.png -------------------------------------------------------------------------------- /resources/eye-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/eye-icon.png -------------------------------------------------------------------------------- /resources/keyboard.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/keyboard.jpg -------------------------------------------------------------------------------- /resources/noodles.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/noodles.jpg -------------------------------------------------------------------------------- /resources/uv-grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/uv-grid.png -------------------------------------------------------------------------------- /resources/f-texture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/f-texture.png -------------------------------------------------------------------------------- /resources/mip-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/mip-example.png -------------------------------------------------------------------------------- /resources/rotate-30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/rotate-30.png -------------------------------------------------------------------------------- /resources/rotate-60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/rotate-60.png -------------------------------------------------------------------------------- /resources/rotate-90.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/rotate-90.png -------------------------------------------------------------------------------- /resources/tdl/error.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/tdl/error.jpg -------------------------------------------------------------------------------- /resources/images/frame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/images/frame.png -------------------------------------------------------------------------------- /lessons/imgs/23_pbr_result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/23_pbr_result.png -------------------------------------------------------------------------------- /lessons/imgs/0_setup_devtool.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/0_setup_devtool.JPG -------------------------------------------------------------------------------- /lessons/imgs/0_setup_result.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/0_setup_result.JPG -------------------------------------------------------------------------------- /lessons/imgs/23_pbr_ctr_eqn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/23_pbr_ctr_eqn.png -------------------------------------------------------------------------------- /lessons/imgs/toc/14_texture.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/toc/14_texture.JPG -------------------------------------------------------------------------------- /resources/models/chair/chair.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/models/chair/chair.jpg -------------------------------------------------------------------------------- /lessons/imgs/14_texture_result.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/14_texture_result.jpg -------------------------------------------------------------------------------- /lessons/imgs/toc/19_depth_map.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/toc/19_depth_map.JPG -------------------------------------------------------------------------------- /lessons/imgs/toc/23_pbr_result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/toc/23_pbr_result.png -------------------------------------------------------------------------------- /resources/mip-low-res-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/mip-low-res-example.png -------------------------------------------------------------------------------- /lessons/imgs/16_diffuse_light_dot.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/16_diffuse_light_dot.JPG -------------------------------------------------------------------------------- /lessons/imgs/19_depth_map_result.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/19_depth_map_result.jpg -------------------------------------------------------------------------------- /lessons/imgs/toc/10_using_matrix.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/toc/10_using_matrix.JPG -------------------------------------------------------------------------------- /lessons/imgs/toc/15_ambient_light.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/toc/15_ambient_light.JPG -------------------------------------------------------------------------------- /lessons/imgs/toc/16_diffuse_light.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/toc/16_diffuse_light.JPG -------------------------------------------------------------------------------- /lessons/imgs/toc/17_specular_term.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/toc/17_specular_term.JPG -------------------------------------------------------------------------------- /resources/f-texture-pixel-coords.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/f-texture-pixel-coords.png -------------------------------------------------------------------------------- /lessons/imgs/15_ambient_light_result.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/15_ambient_light_result.JPG -------------------------------------------------------------------------------- /lessons/imgs/19_depth_map_far_plane.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/19_depth_map_far_plane.jpg -------------------------------------------------------------------------------- /lessons/imgs/19_depth_map_first_pass.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/19_depth_map_first_pass.jpg -------------------------------------------------------------------------------- /lessons/imgs/23_pbr_two_point_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/23_pbr_two_point_light.png -------------------------------------------------------------------------------- /lessons/imgs/5_shader_uniform_result.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/5_shader_uniform_result.JPG -------------------------------------------------------------------------------- /lessons/imgs/toc/02_shader_attribute.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/toc/02_shader_attribute.JPG -------------------------------------------------------------------------------- /lessons/imgs/toc/03_draw_from_index.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/toc/03_draw_from_index.JPG -------------------------------------------------------------------------------- /lessons/imgs/toc/04_shader_uniform.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/toc/04_shader_uniform.JPG -------------------------------------------------------------------------------- /resources/models/killer_whale/whale.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/models/killer_whale/whale.png -------------------------------------------------------------------------------- /lessons/imgs/16_diffuse_light_formula.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/16_diffuse_light_formula.JPG -------------------------------------------------------------------------------- /lessons/imgs/17_specular_light_result.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/17_specular_light_result.JPG -------------------------------------------------------------------------------- /lessons/imgs/19_depth_map_created_FBO.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/19_depth_map_created_FBO.jpg -------------------------------------------------------------------------------- /lessons/imgs/19_depth_map_default_FBO.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/19_depth_map_default_FBO.jpg -------------------------------------------------------------------------------- /lessons/imgs/19_depth_map_second_pass.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/19_depth_map_second_pass.jpg -------------------------------------------------------------------------------- /lessons/imgs/23_pbr_single_point_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/23_pbr_single_point_light.png -------------------------------------------------------------------------------- /lessons/imgs/toc/07_buffer_abstraction.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/toc/07_buffer_abstraction.JPG -------------------------------------------------------------------------------- /lessons/imgs/toc/13_model_abstraction.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/toc/13_model_abstraction.JPG -------------------------------------------------------------------------------- /lessons/imgs/toc/18_light_abstraction.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/toc/18_light_abstraction.JPG -------------------------------------------------------------------------------- /lessons/imgs/toc/22_shadow_mapping_pcf.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/toc/22_shadow_mapping_pcf.JPG -------------------------------------------------------------------------------- /resources/models/windmill/windmill-obj.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/models/windmill/windmill-obj.jpg -------------------------------------------------------------------------------- /lessons/24_toon_shading/TwoToneGradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/24_toon_shading/TwoToneGradient.png -------------------------------------------------------------------------------- /lessons/24_toon_shading/UtilToonGradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/24_toon_shading/UtilToonGradient.png -------------------------------------------------------------------------------- /lessons/imgs/10_projection_matrix_devtool.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/10_projection_matrix_devtool.jpg -------------------------------------------------------------------------------- /lessons/imgs/12_model_matrix_and_load_obj.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/12_model_matrix_and_load_obj.JPG -------------------------------------------------------------------------------- /lessons/imgs/15_ambient_light_cull_only.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/15_ambient_light_cull_only.JPG -------------------------------------------------------------------------------- /lessons/imgs/16_diffuse_light_ambient_0.0.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/16_diffuse_light_ambient_0.0.JPG -------------------------------------------------------------------------------- /lessons/imgs/16_diffuse_light_ambient_0.2.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/16_diffuse_light_ambient_0.2.JPG -------------------------------------------------------------------------------- /lessons/imgs/17_specular_light_unity_pbr.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/17_specular_light_unity_pbr.JPG -------------------------------------------------------------------------------- /lessons/imgs/17_specular_light_v_vector.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/17_specular_light_v_vector.JPG -------------------------------------------------------------------------------- /lessons/imgs/18_light_abstraction_result.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/18_light_abstraction_result.JPG -------------------------------------------------------------------------------- /lessons/imgs/20_shadow_mapping_first_try.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/20_shadow_mapping_first_try.jpg -------------------------------------------------------------------------------- /lessons/imgs/21_shadow_mapping_add_bias.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/21_shadow_mapping_add_bias.jpg -------------------------------------------------------------------------------- /lessons/imgs/22_shadow_mapping_pcf_result.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/22_shadow_mapping_pcf_result.jpg -------------------------------------------------------------------------------- /lessons/imgs/8_va_abstraction_rect_array.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/8_va_abstraction_rect_array.jpg -------------------------------------------------------------------------------- /resources/models/killer_whale/thumbnail.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/models/killer_whale/thumbnail.jpg -------------------------------------------------------------------------------- /lessons/imgs/11_input_handling_camera_space.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/11_input_handling_camera_space.jpg -------------------------------------------------------------------------------- /lessons/imgs/8_va_abstraction_rect_vertices.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/8_va_abstraction_rect_vertices.jpg -------------------------------------------------------------------------------- /lessons/imgs/toc/21_shadow_mapping_add_bias.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/toc/21_shadow_mapping_add_bias.JPG -------------------------------------------------------------------------------- /resources/models/killer_whale/whale.CYCLES.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/models/killer_whale/whale.CYCLES.bin -------------------------------------------------------------------------------- /lessons/imgs/11_input_handling_camera_setting.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/11_input_handling_camera_setting.jpg -------------------------------------------------------------------------------- /lessons/imgs/11_input_handling_keyboardevent.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/11_input_handling_keyboardevent.jpg -------------------------------------------------------------------------------- /lessons/imgs/11_input_handling_window_object.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/11_input_handling_window_object.jpg -------------------------------------------------------------------------------- /lessons/imgs/12_model_matrix_and_load_obj_raf1.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/12_model_matrix_and_load_obj_raf1.JPG -------------------------------------------------------------------------------- /lessons/imgs/12_model_matrix_and_load_obj_raf2.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/12_model_matrix_and_load_obj_raf2.JPG -------------------------------------------------------------------------------- /lessons/imgs/21_shadow_mapping_add_bias_result.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/21_shadow_mapping_add_bias_result.jpg -------------------------------------------------------------------------------- /lessons/imgs/22_shadow_mapping_pcf_area_light.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/22_shadow_mapping_pcf_area_light.jpg -------------------------------------------------------------------------------- /lessons/imgs/22_shadow_mapping_pcf_hard_shadow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/22_shadow_mapping_pcf_hard_shadow.jpg -------------------------------------------------------------------------------- /lessons/imgs/22_shadow_mapping_pcf_point_light.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/22_shadow_mapping_pcf_point_light.jpg -------------------------------------------------------------------------------- /lessons/imgs/6_drawing_multiple_objects_result.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/6_drawing_multiple_objects_result.JPG -------------------------------------------------------------------------------- /lessons/imgs/toc/05_shader_uniform_interactive.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/toc/05_shader_uniform_interactive.JPG -------------------------------------------------------------------------------- /lessons/imgs/toc/08_vertex_array_abstraction.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/toc/08_vertex_array_abstraction.JPG -------------------------------------------------------------------------------- /lessons/imgs/toc/12_model_matrix_and_load_obj.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/toc/12_model_matrix_and_load_obj.JPG -------------------------------------------------------------------------------- /lessons/imgs/toc/20_shadow_mapping_first_try.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/toc/20_shadow_mapping_first_try.JPG -------------------------------------------------------------------------------- /resources/images/computer-history-museum/neg-x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/images/computer-history-museum/neg-x.jpg -------------------------------------------------------------------------------- /resources/images/computer-history-museum/neg-y.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/images/computer-history-museum/neg-y.jpg -------------------------------------------------------------------------------- /resources/images/computer-history-museum/neg-z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/images/computer-history-museum/neg-z.jpg -------------------------------------------------------------------------------- /resources/images/computer-history-museum/pos-x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/images/computer-history-museum/pos-x.jpg -------------------------------------------------------------------------------- /resources/images/computer-history-museum/pos-y.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/images/computer-history-museum/pos-y.jpg -------------------------------------------------------------------------------- /resources/images/computer-history-museum/pos-z.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/images/computer-history-museum/pos-z.jpg -------------------------------------------------------------------------------- /lessons/imgs/12_model_matrix_and_load_obj_teapot.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/12_model_matrix_and_load_obj_teapot.JPG -------------------------------------------------------------------------------- /lessons/imgs/15_ambient_light_cull_only_problem.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/15_ambient_light_cull_only_problem.JPG -------------------------------------------------------------------------------- /lessons/imgs/20_shadow_mapping_first_try_result.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/20_shadow_mapping_first_try_result.jpg -------------------------------------------------------------------------------- /lessons/imgs/toc/06_drawing_multiple_objects_pt1.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/toc/06_drawing_multiple_objects_pt1.JPG -------------------------------------------------------------------------------- /lessons/imgs/toc/06_drawing_multiple_objects_pt2.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/toc/06_drawing_multiple_objects_pt2.JPG -------------------------------------------------------------------------------- /lessons/imgs/toc/09_shader_renderer_abstraction.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/toc/09_shader_renderer_abstraction.JPG -------------------------------------------------------------------------------- /lessons/imgs/toc/11_input_handling_color_change.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/toc/11_input_handling_color_change.JPG -------------------------------------------------------------------------------- /resources/models/windmill/windmill_001_base_COL.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/models/windmill/windmill_001_base_COL.jpg -------------------------------------------------------------------------------- /resources/models/windmill/windmill_001_base_NOR.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/models/windmill/windmill_001_base_NOR.jpg -------------------------------------------------------------------------------- /resources/models/windmill/windmill_001_base_SPEC.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/models/windmill/windmill_001_base_SPEC.jpg -------------------------------------------------------------------------------- /lessons/imgs/14_texture_texture_units_and_objects.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/14_texture_texture_units_and_objects.png -------------------------------------------------------------------------------- /lessons/imgs/toc/11_input_handling_camera_control.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/toc/11_input_handling_camera_control.JPG -------------------------------------------------------------------------------- /resources/models/book-vertex-chameleon-study/book.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/models/book-vertex-chameleon-study/book.png -------------------------------------------------------------------------------- /resources/models/windmill/windmill_001_lopatky_COL.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/models/windmill/windmill_001_lopatky_COL.jpg -------------------------------------------------------------------------------- /resources/models/windmill/windmill_001_lopatky_NOR.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/models/windmill/windmill_001_lopatky_NOR.jpg -------------------------------------------------------------------------------- /lessons/_shaders/dirDepthmapFragment.js: -------------------------------------------------------------------------------- 1 | export default 2 | `#version 300 es 3 | //프래그먼트 셰이더는 아무것도 하지 않아도 됩니다. 4 | precision highp float; 5 | 6 | void main() 7 | { 8 | 9 | } 10 | `; -------------------------------------------------------------------------------- /lessons/imgs/8_va_abstraction_rect_array_stride_offset.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/8_va_abstraction_rect_array_stride_offset.jpg -------------------------------------------------------------------------------- /resources/css/ui-lightness/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/css/ui-lightness/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /resources/css/ui-lightness/images/ui-icons_228ef1_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/css/ui-lightness/images/ui-icons_228ef1_256x240.png -------------------------------------------------------------------------------- /resources/css/ui-lightness/images/ui-icons_ef8c08_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/css/ui-lightness/images/ui-icons_ef8c08_256x240.png -------------------------------------------------------------------------------- /resources/css/ui-lightness/images/ui-icons_ffd27a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/css/ui-lightness/images/ui-icons_ffd27a_256x240.png -------------------------------------------------------------------------------- /resources/css/ui-lightness/images/ui-icons_ffffff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/css/ui-lightness/images/ui-icons_ffffff_256x240.png -------------------------------------------------------------------------------- /resources/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png -------------------------------------------------------------------------------- /resources/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /lessons/imgs/17_specular_light_result_dullmat_intensity_change.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/lessons/imgs/17_specular_light_result_dullmat_intensity_change.JPG -------------------------------------------------------------------------------- /resources/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png -------------------------------------------------------------------------------- /resources/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png -------------------------------------------------------------------------------- /resources/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png -------------------------------------------------------------------------------- /resources/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png -------------------------------------------------------------------------------- /resources/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png -------------------------------------------------------------------------------- /resources/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png -------------------------------------------------------------------------------- /resources/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbnu-vclab/webgl-computer-graphics-lecture/HEAD/resources/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png -------------------------------------------------------------------------------- /lessons/_shaders/simpleVertex.js: -------------------------------------------------------------------------------- 1 | export default 2 | `#version 300 es 3 | 4 | layout(location=0) in vec4 a_position; 5 | 6 | out vec4 v_color; 7 | 8 | void main() { 9 | gl_Position = a_position; 10 | } 11 | `; 12 | -------------------------------------------------------------------------------- /lessons/_shaders/simpleFragment.js: -------------------------------------------------------------------------------- 1 | export default 2 | `#version 300 es 3 | 4 | precision highp float; 5 | 6 | layout(location=0) out vec4 outColor; 7 | 8 | uniform vec4 u_color; 9 | 10 | void main() { 11 | outColor = u_color; 12 | } 13 | ` -------------------------------------------------------------------------------- /resources/models/chair/license.md: -------------------------------------------------------------------------------- 1 | # Chair 2 | 3 | https://sketchfab.com/3d-models/chair-aa2acddb218646a59ece132bf95aa558 4 | 5 | # By haytonm 6 | 7 | https://sketchfab.com/haytonm 8 | 9 | # License: CC-BY 4.0 10 | 11 | http://creativecommons.org/licenses/by/4.0/ -------------------------------------------------------------------------------- /resources/models/cube/cube.mtl: -------------------------------------------------------------------------------- 1 | # Blender MTL File: 'None' 2 | # Material Count: 1 3 | 4 | newmtl Material 5 | Ns 323.999994 6 | Ka 1.000000 1.000000 1.000000 7 | Kd 0.800000 0.800000 0.800000 8 | Ks 0.500000 0.500000 0.500000 9 | Ke 0.0 0.0 0.0 10 | Ni 1.450000 11 | d 1.000000 12 | illum 2 13 | -------------------------------------------------------------------------------- /lessons/_shaders/basicProjectionFragment.js: -------------------------------------------------------------------------------- 1 | export default 2 | `#version 300 es 3 | 4 | precision highp float; 5 | 6 | layout(location=0) out vec4 outColor; 7 | 8 | uniform vec4 u_color; 9 | 10 | void main() { 11 | outColor = u_color; //Shader 클래스의 동작 확인을 위해 uniform 색상으로 그리도록 수정 12 | } 13 | ` -------------------------------------------------------------------------------- /lessons/_shaders/basicViewProjectionFragment.js: -------------------------------------------------------------------------------- 1 | export default 2 | `#version 300 es 3 | 4 | precision highp float; 5 | 6 | layout(location=0) out vec4 outColor; 7 | 8 | uniform vec4 u_color; 9 | 10 | void main() { 11 | outColor = u_color; //Shader 클래스의 동작 확인을 위해 uniform 색상으로 그리도록 수정 12 | } 13 | ` -------------------------------------------------------------------------------- /lessons/_shaders/textureFragment.js: -------------------------------------------------------------------------------- 1 | export default 2 | `#version 300 es 3 | 4 | precision highp float; 5 | 6 | layout(location=0) out vec4 outColor; 7 | 8 | in vec2 v_texcoord; 9 | in vec3 v_normal; 10 | 11 | uniform sampler2D u_mainTexture; 12 | 13 | void main() { 14 | outColor = texture(u_mainTexture, v_texcoord); 15 | } 16 | ` -------------------------------------------------------------------------------- /resources/models/book-vertex-chameleon-study/LICENSE.md: -------------------------------------------------------------------------------- 1 | # Book - Vertex chameleon study 2 | 3 | From: https://sketchfab.com/3d-models/book-vertex-chameleon-study-51b0b3bdcd844a9e951a9ede6f192da8 4 | 5 | # Author: Oleaf 6 | 7 | https://sketchfab.com/homkahom0 8 | 9 | # License: CC-BY-NC 10 | 11 | http://creativecommons.org/licenses/by-nc/4.0/ 12 | -------------------------------------------------------------------------------- /lessons/_shaders/dirDepthmapVertex.js: -------------------------------------------------------------------------------- 1 | export default 2 | `#version 300 es 3 | layout(location=0) in vec3 a_position; 4 | 5 | uniform mat4 u_model; //모델의 world공간 위치와 자세 6 | uniform mat4 u_directionalLightViewProjection; //카메라의 VP 행렬 7 | 8 | void main() { 9 | gl_Position = u_directionalLightViewProjection * u_model * vec4(a_position,1.0); 10 | } 11 | `; -------------------------------------------------------------------------------- /lessons/_shaders/basicFragment.js: -------------------------------------------------------------------------------- 1 | export default 2 | `#version 300 es 3 | 4 | precision highp float; 5 | 6 | layout(location=0) out vec4 outColor; 7 | 8 | //정점 셰이더로부터 전달받은 varying 9 | //각 프래그먼트에 대해 보간된 값이 저장되어 있음 10 | in vec2 v_texcoord; 11 | in vec3 v_normal; 12 | 13 | uniform vec4 u_color; 14 | 15 | void main() { 16 | outColor = vec4(1.0,0.0,0.0,1.0); 17 | } 18 | ` -------------------------------------------------------------------------------- /lessons/_shaders/basicProjectionVertex.js: -------------------------------------------------------------------------------- 1 | export default 2 | `#version 300 es 3 | 4 | layout(location=0) in vec4 a_position; 5 | layout(location=1) in vec4 a_color; 6 | 7 | uniform mat4 u_projection; // <-- 4x4 투영 행렬을 uniform으로 받을 겁니다. (즉, CPU로부터 전달받을 겁니다.) 8 | 9 | void main() { 10 | gl_Position = u_projection * a_position; //이제 position은 u_projection에 의해 변환됩니다. 11 | } 12 | `; 13 | -------------------------------------------------------------------------------- /lessons/_shaders/basicViewProjectionVertex.js: -------------------------------------------------------------------------------- 1 | export default 2 | `#version 300 es 3 | 4 | layout(location=0) in vec4 a_position; 5 | layout(location=1) in vec4 a_color; 6 | 7 | uniform mat4 u_projection; 8 | uniform mat4 u_view; //Camera 클래스에서 반환된 view행렬 9 | 10 | void main() { 11 | gl_Position = u_projection * u_view * a_position; //proj * view * (model) * position 12 | } 13 | `; 14 | -------------------------------------------------------------------------------- /resources/models/windmill/license.md: -------------------------------------------------------------------------------- 1 | This model is licensed under the Creative Commons CC-BY-SA 3.0 license 2 | 3 | http://creativecommons.org/licenses/by-sa/3.0/ 4 | 5 | It can be used as long as attribution is given and any modifications 6 | are under the same license 7 | 8 | It was created by [ahedov](https://www.blendswap.com/user/ahedov) 9 | 10 | https://www.blendswap.com/blends/view/69174 11 | -------------------------------------------------------------------------------- /resources/lesson-helper.css: -------------------------------------------------------------------------------- 1 | .contextlost { 2 | position: absolute; 3 | left: 0; 4 | top: 0; 5 | width: 100vw; 6 | height: 100vh; 7 | background: red; 8 | color: white; 9 | font-family: monospace; 10 | font-weight: bold; 11 | display: flex; 12 | align-items: center; 13 | justify-content: center; 14 | } 15 | .contextlost>div { 16 | padding: 0.5em; 17 | background: darkred; 18 | cursor: pointer; 19 | } -------------------------------------------------------------------------------- /lessons/_classes/Material.js: -------------------------------------------------------------------------------- 1 | export default class Material{ 2 | specularIntensity; 3 | shininess; 4 | 5 | constructor(sIntensity, shininess) 6 | { 7 | this.specularIntensity = sIntensity; 8 | this.shininess = shininess; 9 | } 10 | 11 | UseMaterial(gl, shader) 12 | { 13 | shader.SetUniform1f(gl,"u_material.specularIntensity", this.specularIntensity); 14 | shader.SetUniform1f(gl,"u_material.shininess", this.shininess); 15 | } 16 | 17 | } -------------------------------------------------------------------------------- /lessons/_classes/VertexBuffer.js: -------------------------------------------------------------------------------- 1 | // VertexBuffer 관리를 위한 클래스 구현 2 | export default class VertexBuffer{ 3 | id; // 멤버 변수(필드) 4 | 5 | constructor(gl, data) //생성자 6 | { 7 | this.id = gl.createBuffer(); 8 | gl.bindBuffer(gl.ARRAY_BUFFER, this.id); 9 | gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(data), gl.STATIC_DRAW); 10 | } 11 | 12 | Bind(gl) 13 | { 14 | gl.bindBuffer(gl.ARRAY_BUFFER, this.id); 15 | } 16 | 17 | Unbind(gl) 18 | { 19 | gl.bindBuffer(gl.ARRAY_BUFFER, null); 20 | } 21 | } -------------------------------------------------------------------------------- /lessons/_classes/Renderer.js: -------------------------------------------------------------------------------- 1 | // Renderer 클래스 구현 2 | export default class Renderer{ 3 | Clear(gl) 4 | { 5 | gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); 6 | } 7 | 8 | Draw(gl, va, ib, shader) 9 | { 10 | //무언가를 그릴때, 3가지가 기본적으로 필요함. vao, ibo, shader program 11 | shader.Bind(gl); 12 | va.Bind(gl); 13 | 14 | var primitiveType = gl.TRIANGLES; 15 | var indexcount = ib.getCount(); 16 | var indexoffset = 0 17 | gl.drawElements(primitiveType, indexcount, gl.UNSIGNED_SHORT, 0); 18 | } 19 | } -------------------------------------------------------------------------------- /lessons/_shaders/textureVertex.js: -------------------------------------------------------------------------------- 1 | export default 2 | `#version 300 es 3 | 4 | //--Attributes 5 | layout(location=0) in vec3 a_position; 6 | layout(location=1) in vec2 a_texcoord; 7 | layout(location=2) in vec3 a_normal; 8 | 9 | //--Uniforms 10 | uniform mat4 u_projection; 11 | uniform mat4 u_view; 12 | uniform mat4 u_model; 13 | 14 | //--Varyings 15 | out vec2 v_texcoord; 16 | out vec3 v_normal; 17 | 18 | void main() { 19 | gl_Position = u_projection * u_view * u_model * vec4(a_position, 1.0); //이제 a_position이 vec3이기 때문에 vec4로 만들어 곱해줘야 합니다. 20 | 21 | v_texcoord = a_texcoord; 22 | v_normal = a_normal; 23 | } 24 | `; 25 | -------------------------------------------------------------------------------- /resources/models/windmill/windmill.mtl: -------------------------------------------------------------------------------- 1 | # Blender MTL File: 'windmill_001.blend' 2 | # Material Count: 2 3 | 4 | newmtl Material 5 | Ns 0.000000 6 | Ka 1.000000 1.000000 1.000000 7 | Kd 0.800000 0.800000 0.800000 8 | Ks 0.000000 0.000000 0.000000 9 | Ke 0.000000 0.000000 0.000000 10 | Ni 1.000000 11 | d 1.000000 12 | illum 1 13 | map_Kd windmill_001_lopatky_COL.jpg 14 | map_Bump windmill_001_lopatky_NOR.jpg 15 | 16 | newmtl windmill 17 | Ns 0.000000 18 | Ka 1.000000 1.000000 1.000000 19 | Kd 0.800000 0.800000 0.800000 20 | Ks 0.000000 0.000000 0.000000 21 | Ke 0.000000 0.000000 0.000000 22 | Ni 1.000000 23 | d 1.000000 24 | illum 1 25 | map_Kd windmill_001_base_COL.jpg 26 | map_Bump windmill_001_base_NOR.jpg 27 | map_Ns windmill_001_base_SPEC.jpg 28 | -------------------------------------------------------------------------------- /lessons/_shaders/dirLightVertex.js: -------------------------------------------------------------------------------- 1 | export default 2 | `#version 300 es 3 | layout(location=0) in vec3 a_position; 4 | layout(location=1) in vec2 a_texcoord; 5 | layout(location=2) in vec3 a_normal; 6 | 7 | uniform mat4 u_projection; 8 | uniform mat4 u_view; //카메라를 통해 반환된 View행렬 9 | uniform mat4 u_model; //모델의 world공간 위치와 자세 10 | 11 | out vec2 v_texcoord; 12 | out vec3 v_normal; 13 | out vec3 v_worldPosition; 14 | 15 | void main() { 16 | gl_Position = u_projection * u_view * u_model * vec4(a_position,1.0); 17 | v_texcoord = a_texcoord; 18 | 19 | v_normal = mat3(transpose(inverse(u_model))) * a_normal; 20 | 21 | v_worldPosition = (u_model * vec4(a_position, 1.0)).xyz; //<-- 모델 행렬만 곱하면 월드공간 좌표가 얻어집니다. 22 | } 23 | `; -------------------------------------------------------------------------------- /lessons/_shaders/basicVertex.js: -------------------------------------------------------------------------------- 1 | export default 2 | `#version 300 es 3 | //이제 일반적인 형태의 정점 셰이더를 구현합니다. 4 | //각 정점은 position(위치 좌표), texcoord(텍스처 좌표), normal(법선) 데이터를 가집니다. 5 | 6 | //--Attributes 7 | layout(location=0) in vec3 a_position; 8 | layout(location=1) in vec2 a_texcoord; 9 | layout(location=2) in vec3 a_normal; 10 | 11 | //--Uniforms 12 | uniform mat4 u_projection; 13 | uniform mat4 u_view; 14 | uniform mat4 u_model; 15 | 16 | //--Varyings 17 | out vec2 v_texcoord; 18 | out vec3 v_normal; 19 | 20 | void main() { 21 | gl_Position = u_projection * u_view * u_model * vec4(a_position, 1.0); //이제 a_position이 vec3이기 때문에 vec4로 만들어 곱해줘야 합니다. 22 | 23 | //프래그먼트 셰이더로 값을 넘김 24 | v_texcoord = a_texcoord; 25 | v_normal = a_normal; 26 | } 27 | `; 28 | -------------------------------------------------------------------------------- /lessons/_classes/IndexBuffer.js: -------------------------------------------------------------------------------- 1 | // IndexBuffer 관리를 위한 클래스 구현 2 | export default class IndexBuffer{ 3 | id; 4 | count; 5 | 6 | constructor(gl, data, count) 7 | { 8 | this.id = gl.createBuffer(); 9 | gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.id); 10 | gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(data), gl.STATIC_DRAW); 11 | 12 | this.count = count; //나중에 drawElement를 할 때 몇 개의 index를 그릴 것인지 명시해 주어야 하므로 따로 저장함 13 | } 14 | 15 | Bind(gl) 16 | { 17 | gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.id); 18 | } 19 | 20 | Unbind(gl) 21 | { 22 | gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null); 23 | } 24 | 25 | getCount() 26 | { 27 | return this.count; 28 | } 29 | } -------------------------------------------------------------------------------- /lessons/_shaders/toonVertex.js: -------------------------------------------------------------------------------- 1 | export default 2 | `#version 300 es 3 | //이제 일반적인 형태의 정점 셰이더를 구현합니다. 4 | //각 정점은 position(위치 좌표), texcoord(텍스처 좌표), normal(법선) 데이터를 가집니다. 5 | 6 | //--Attributes 7 | layout(location=0) in vec3 a_position; 8 | layout(location=1) in vec2 a_texcoord; 9 | layout(location=2) in vec3 a_normal; 10 | 11 | //--Uniforms 12 | uniform mat4 u_projection; 13 | uniform mat4 u_view; 14 | uniform mat4 u_model; 15 | 16 | //--Varyings 17 | out vec2 v_texcoord; 18 | out vec3 v_normal; 19 | 20 | void main() { 21 | gl_Position = u_projection * u_view * u_model * vec4(a_position, 1.0); //이제 a_position이 vec3이기 때문에 vec4로 만들어 곱해줘야 합니다. 22 | 23 | //프래그먼트 셰이더로 값을 넘김 24 | v_texcoord = a_texcoord; 25 | v_normal = mat3(transpose(inverse(u_model))) * a_normal; 26 | } 27 | `; 28 | -------------------------------------------------------------------------------- /lessons/_shaders/PBRShaderVertex.js: -------------------------------------------------------------------------------- 1 | // dirLightVertex와 동일한 Source 2 | 3 | export default 4 | `#version 300 es 5 | layout(location=0) in vec3 a_position; 6 | layout(location=1) in vec2 a_texcoord; 7 | layout(location=2) in vec3 a_normal; 8 | 9 | uniform mat4 u_projection; 10 | uniform mat4 u_view; //카메라를 통해 반환된 View행렬 11 | uniform mat4 u_model; //모델의 world공간 위치와 자세 12 | 13 | out vec2 v_texcoord; 14 | out vec3 v_normal; 15 | out vec3 v_worldPosition; 16 | 17 | void main() { 18 | gl_Position = u_projection * u_view * u_model * vec4(a_position,1.0); 19 | v_texcoord = a_texcoord; 20 | 21 | v_normal = mat3(transpose(inverse(u_model))) * a_normal; 22 | 23 | v_worldPosition = (u_model * vec4(a_position, 1.0)).xyz; //<-- 모델 행렬만 곱하면 월드공간 좌표가 얻어집니다. 24 | } 25 | `; -------------------------------------------------------------------------------- /lessons/08_vertex_array_abstraction/contents.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 |