Changeset 8e02b6b in opengl-game for shaders/ship.vert
- Timestamp:
- Nov 22, 2019, 6:27:13 PM (5 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- f97c5e7
- Parents:
- 683dd55
- git-author:
- Dmitry Portnoy <dmitry.portnoy@…> (11/22/19 18:26:59)
- git-committer:
- Dmitry Portnoy <dmitry.portnoy@…> (11/22/19 18:27:13)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
shaders/ship.vert
r683dd55 r8e02b6b 2 2 #extension GL_ARB_separate_shader_objects : enable 3 3 4 // TODO: Figure out if the UniformBufferObject label is necessary and, if not, remove it 4 5 layout (binding = 0) uniform UniformBufferObject { 5 6 mat4 model; … … 10 11 layout(location = 0) in vec3 vertex_position; 11 12 layout(location = 1) in vec3 vertex_color; 13 //layout(location = 2) in vec3 vertex_normal; 14 //layout(location = 3) in uint ubo_index; 12 15 13 16 //out vec3 position_eye, normal_eye, color, light_position_eye, light2_position_eye; … … 20 23 21 24 void main() { 22 // ORIG:position_eye = vec3(view * model_mats[ubo_index] * vec4(vertex_position, 1.0));23 position_eye = vec3(ubo.view * ubo.model * vec4(vertex_position, 1.0));24 //normal_eye = normalize(vec3(view * model_mats[ubo_index] * vec4(vertex_normal, 0.0)));25 color = vertex_color;26 //light_position_eye = vec3(view * vec4(light_position_world, 1.0));27 //light2_position_eye = vec3(view * vec4(light2_position_world, 1.0));25 //position_eye = vec3(view * model_mats[ubo_index] * vec4(vertex_position, 1.0)); 26 position_eye = vec3(ubo.view * ubo.model * vec4(vertex_position, 1.0)); 27 //normal_eye = normalize(vec3(view * model_mats[ubo_index] * vec4(vertex_normal, 0.0))); 28 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)); 28 31 29 gl_Position = ubo.proj * vec4(position_eye, 1.0);32 gl_Position = ubo.proj * vec4(position_eye, 1.0); 30 33 }
Note:
See TracChangeset
for help on using the changeset viewer.