Changeset f7d35da in opengl-game for color.vert


Ignore:
Timestamp:
Jun 10, 2018, 9:31:48 PM (7 years ago)
Author:
Dmitry Portnoy <dmp1488@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
5c403fe
Parents:
0d5c100
Message:

Add a system to keep track of which keys are pressed or held down and add another light source to help illuminate the scene from different directions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • color.vert

    r0d5c100 rf7d35da  
    1414layout(location = 3) in uint ubo_index;
    1515
    16 out vec3 position_eye, normal_eye, color, light_position_eye;
     16out vec3 position_eye, normal_eye, color, light_position_eye, light2_position_eye;
    1717
    1818// fixed point light position
    1919vec3 light_position_world = vec3(0.0, 0.0, 2.0);
     20vec3 light2_position_world = vec3(0.0, -3.0, -2.0);
    2021
    2122void main() {
     
    2425  color = vertex_color;
    2526  light_position_eye = vec3(view * vec4(light_position_world, 1.0));
     27  light2_position_eye = vec3(view * vec4(light2_position_world, 1.0));
    2628
    2729  gl_Position = proj * vec4(position_eye, 1.0);
Note: See TracChangeset for help on using the changeset viewer.