Changes in / [2b40f48:cf727ca] in opengl-game
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
shaders/ship.frag
r2b40f48 rcf727ca 43 43 vec3 Is = Ls * Ks * specular_factor; 44 44 45 //outColor = vec4(Is + Id + Ia, 1.0); 46 outColor = vec4(color, 1.0); 45 outColor = vec4(Is + Id + Ia, 1.0); 47 46 } -
shaders/ship.vert
r2b40f48 rcf727ca 40 40 light_position_eye = vec3(ubo.view * vec4(light_position_world, 1.0)); 41 41 42 //gl_Position = ubo.proj * vec4(position_eye, 1.0); 43 gl_Position = vec4(vertex_position, 1.0); 42 gl_Position = ubo.proj * vec4(position_eye, 1.0); 44 43 } -
vulkan-game.cpp
r2b40f48 rcf727ca 269 269 // TODO: With the normals, indexing basically becomes pointless since no vertices will have exactly 270 270 // the same data. Add an option to make some pipelines not use indexing 271 /*272 271 shipPipeline.addObject( 273 272 addObjectIndex<ShipVertex>(shipPipeline.getObjects().size(), … … 499 498 135, 136, 137, 500 499 }, commandPool, graphicsQueue); 501 */502 503 // z-range is 0 to 1, with +1 pointing into the screen504 shipPipeline.addObject(addVertexNormals<ShipVertex>({505 {{ 0.5f, -0.5f, 0.5f}, {0.0f, 0.6f, 0.0f}},506 {{ -0.5f, -0.5f, 0.5f}, {0.0f, 0.6f, 0.0f}},507 {{ -0.5f, 0.5f, 0.5f}, {0.0f, 0.6f, 0.0f}},508 {{ 0.5f, -0.5f, 0.5f}, {0.0f, 0.6f, 0.0f}},509 {{ -0.5f, 0.5f, 0.5f}, {0.0f, 0.6f, 0.0f}},510 {{ 0.5f, 0.5f, 0.5f}, {0.0f, 0.6f, 0.0f}},511 512 {{ 0.3f, -0.3f, 0.3f}, {0.0f, 0.0f, 0.7f}},513 {{ -0.3f, -0.3f, 0.3f}, {0.0f, 0.0f, 0.7f}},514 {{ -0.3f, 0.3f, 0.3f}, {0.0f, 0.0f, 0.7f}},515 {{ 0.3f, -0.3f, 0.3f}, {0.0f, 0.0f, 0.7f}},516 {{ -0.3f, 0.3f, 0.3f}, {0.0f, 0.0f, 0.7f}},517 {{ 0.3f, 0.3f, 0.3f}, {0.0f, 0.0f, 0.7f}},518 }), {519 0, 1, 2, 3, 4, 5,520 6, 7, 8, 9, 10, 11,521 }, commandPool, graphicsQueue);522 500 523 501 shipPipeline.createDescriptorSetLayout();
Note:
See TracChangeset
for help on using the changeset viewer.