Changeset b8efa56 in opengl-game for shaders/asteroid.frag
- Timestamp:
- Apr 10, 2021, 1:46:51 AM (4 years ago)
- Branches:
- feature/imgui-sdl
- Children:
- 4a777d2
- Parents:
- 8d92284
- git-author:
- Dmitry Portnoy <dportnoy@…> (04/10/21 01:46:46)
- git-committer:
- Dmitry Portnoy <dportnoy@…> (04/10/21 01:46:51)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
shaders/asteroid.frag
r8d92284 rb8efa56 4 4 layout(location = 0) in vec3 position_eye; 5 5 layout(location = 1) in vec3 color; 6 layout(location = 2) in vec3 normal_eye; 7 layout(location = 3) in vec3 light_position_eye; 8 layout(location = 4) in vec3 light2_position_eye; 6 layout(location = 2) in vec2 fragTexCoord; 7 layout(location = 3) in vec3 normal_eye; 8 layout(location = 4) in vec3 light_position_eye; 9 layout(location = 5) in vec3 light2_position_eye; 9 10 10 11 layout(location = 0) out vec4 frag_color; … … 52 53 // specular intensity 53 54 vec3 Is = Ls * Ks * specular_factor; 54 vec3 Is2 = Ls * Ks * specular_factor2 ;55 vec3 Is2 = Ls * Ks * specular_factor2 + vec3(fragTexCoord, 0.0) - vec3(fragTexCoord, 0.0); 55 56 56 57 frag_color = vec4((Is + Id + Ia + Is2 + Id2 + Ia2)/2, 1.0);
Note:
See TracChangeset
for help on using the changeset viewer.