Changeset aa00bf2 in opengl-game for shaders/ship.vert
- 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.vert
rf97c5e7 raa00bf2 17 17 layout(location = 0) out vec3 position_eye; 18 18 layout(location = 1) out vec3 color; 19 layout(location = 2) out vec3 light_position_eye; 20 layout(location = 3) out vec3 light2_position_eye; 19 21 20 22 // fixed point light position 21 //vec3 light_position_world = vec3(0.0, 0.0, 2.0);22 //vec3 light2_position_world = vec3(0.0, 1.5, -0.1);23 vec3 light_position_world = vec3(0.0, 0.0, 2.0); 24 vec3 light2_position_world = vec3(0.0, 1.5, -0.1); 23 25 24 26 void main() { … … 27 29 //normal_eye = normalize(vec3(view * model_mats[ubo_index] * vec4(vertex_normal, 0.0))); 28 30 color = vertex_color; 29 //light_position_eye = vec3(view * vec4(light_position_world, 1.0));30 //light2_position_eye = vec3(view * vec4(light2_position_world, 1.0));31 light_position_eye = vec3(ubo.view * vec4(light_position_world, 1.0)); 32 light2_position_eye = vec3(ubo.view * vec4(light2_position_world, 1.0)); 31 33 32 34 gl_Position = ubo.proj * vec4(position_eye, 1.0);
Note:
See TracChangeset
for help on using the changeset viewer.