Changeset 9dd2eb7 in opengl-game for texture.vert
- Timestamp:
- Apr 28, 2018, 2:29:20 AM (7 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- 9f4986b
- Parents:
- d9f99b2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
texture.vert
rd9f99b2 r9dd2eb7 5 5 layout(location = 0) in vec3 vertex_position; 6 6 layout(location = 1) in vec2 vt; 7 layout(location = 2) in vec3 vertex_normal; 7 8 8 9 out vec2 texture_coordinates; 10 out vec3 position_eye, normal_eye, light_position_eye; 11 12 // fixed point light position 13 vec3 light_position_world = vec3(0.0, 0.0, 2.0); 9 14 10 15 void main() { 16 position_eye = vec3(view * model * vec4(vertex_position, 1.0)); 17 normal_eye = vec3(view * model * vec4 (vertex_normal, 0.0)); 11 18 texture_coordinates = vt; 12 gl_Position = proj * view * model * vec4(vertex_position, 1.0); 19 light_position_eye = vec3(view * vec4(light_position_world, 1.0)); 20 21 gl_Position = proj * vec4(position_eye, 1.0); 13 22 }
Note:
See TracChangeset
for help on using the changeset viewer.