Changeset aa00bf2 in opengl-game for shaders/ship.frag
- Timestamp:
- Nov 22, 2019, 8:51:26 PM (5 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- 3782d66
- Parents:
- f97c5e7
- git-author:
- Dmitry Portnoy <dmitry.portnoy@…> (11/22/19 20:49:26)
- git-committer:
- Dmitry Portnoy <dmitry.portnoy@…> (11/22/19 20:51:26)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
shaders/ship.frag
rf97c5e7 raa00bf2 5 5 layout(location = 0) in vec3 position_eye; 6 6 layout(location = 1) in vec3 color; 7 layout(location = 2) in vec3 light_position_eye; 8 layout(location = 3) in vec3 light2_position_eye; 7 9 8 10 layout(location = 0) out vec4 outColor; … … 26 28 vec3 Ia2 = La * Ka; 27 29 28 //vec3 direction_to_light_eye = normalize(light_position_eye - position_eye);30 vec3 direction_to_light_eye = normalize(light_position_eye - position_eye); 29 31 //float dot_prod = max(dot(direction_to_light_eye, normal_eye), 0.0); 30 32 … … 32 34 //vec3 Id = Ld * color * dot_prod; 33 35 34 //vec3 direction_to_light2_eye = normalize(light2_position_eye - position_eye);36 vec3 direction_to_light2_eye = normalize(light2_position_eye - position_eye); 35 37 //float dot_prod2 = max(dot(direction_to_light2_eye, normal_eye), 0.0); 36 38 … … 52 54 //vec3 Is2 = Ls * Ks * specular_factor2; 53 55 54 // frag_color = vec4((Is + Id + Ia + Is2 + Id2 + Ia2)/2, 1.0);56 //outColor = vec4((Is + Id + Ia + Is2 + Id2 + Ia2)/2, 1.0); 55 57 outColor = vec4(color, 1.0); 56 58 }
Note:
See TracChangeset
for help on using the changeset viewer.