Changes in / [cf727ca:2b40f48] in opengl-game


Ignore:
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • shaders/ship.frag

    rcf727ca r2b40f48  
    4343   vec3 Is = Ls * Ks * specular_factor;
    4444
    45    outColor = vec4(Is + Id + Ia, 1.0);
     45   //outColor = vec4(Is + Id + Ia, 1.0);
     46   outColor = vec4(color, 1.0);
    4647}
  • shaders/ship.vert

    rcf727ca r2b40f48  
    4040   light_position_eye = vec3(ubo.view * vec4(light_position_world, 1.0));
    4141
    42    gl_Position = ubo.proj * vec4(position_eye, 1.0);
     42   //gl_Position = ubo.proj * vec4(position_eye, 1.0);
     43   gl_Position = vec4(vertex_position, 1.0);
    4344}
  • vulkan-game.cpp

    rcf727ca r2b40f48  
    269269   // TODO: With the normals, indexing basically becomes pointless since no vertices will have exactly
    270270   // the same data. Add an option to make some pipelines not use indexing
     271   /*
    271272   shipPipeline.addObject(
    272273      addObjectIndex<ShipVertex>(shipPipeline.getObjects().size(),
     
    498499         135, 136, 137,
    499500      }, commandPool, graphicsQueue);
     501   */
     502
     503   // z-range is 0 to 1, with +1 pointing into the screen
     504   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);
    500522
    501523   shipPipeline.createDescriptorSetLayout();
Note: See TracChangeset for help on using the changeset viewer.