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


Ignore:
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • shaders/ship.frag

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

    r2b40f48 rcf727ca  
    4040   light_position_eye = vec3(ubo.view * vec4(light_position_world, 1.0));
    4141
    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);
    4443}
  • vulkan-game.cpp

    r2b40f48 rcf727ca  
    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    /*
    272271   shipPipeline.addObject(
    273272      addObjectIndex<ShipVertex>(shipPipeline.getObjects().size(),
     
    499498         135, 136, 137,
    500499      }, 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);
    522500
    523501   shipPipeline.createDescriptorSetLayout();
Note: See TracChangeset for help on using the changeset viewer.