Changeset 7c929fc in opengl-game for vulkan-game.cpp


Ignore:
Timestamp:
Dec 6, 2019, 4:21:54 AM (5 years ago)
Author:
Dmitry Portnoy <dmp1488@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
60578ce
Parents:
2b40f48
Message:

In VulkanGame, make lighting work correctly in the ship shader before the MVP matrices are applied

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vulkan-game.cpp

    r2b40f48 r7c929fc  
    502502
    503503   // z-range is 0 to 1, with +1 pointing into the screen
    504    shipPipeline.addObject(addVertexNormals<ShipVertex>({
     504   shipPipeline.addObject(
     505      addObjectIndex<ShipVertex>(shipPipeline.getObjects().size(),
     506      addVertexNormals<ShipVertex>({
    505507         {{  0.5f,  -0.5f,   0.5f}, {0.0f, 0.6f, 0.0f}},
    506508         {{ -0.5f,  -0.5f,   0.5f}, {0.0f, 0.6f, 0.0f}},
     
    516518         {{ -0.3f,   0.3f,   0.3f}, {0.0f, 0.0f, 0.7f}},
    517519         {{  0.3f,   0.3f,   0.3f}, {0.0f, 0.0f, 0.7f}},
    518    }), {
     520      })), {
    519521         0,   1,   2,   3,   4,   5,
    520522         6,   7,   8,   9,   10,   11,
    521    }, commandPool, graphicsQueue);
     523      }, commandPool, graphicsQueue);
    522524
    523525   shipPipeline.createDescriptorSetLayout();
Note: See TracChangeset for help on using the changeset viewer.