Changeset 914bb99 in opengl-game for vulkan-game.hpp


Ignore:
Timestamp:
Apr 9, 2021, 3:26:38 PM (3 years ago)
Author:
Dmitry Portnoy <dportnoy@…>
Branches:
feature/imgui-sdl
Children:
a00eb06
Parents:
5049354
Message:

In VulkanGame, specify each vertex explicitly for the model pipeline instead of using the same index multiple times, in order to support the current approach to normal calculation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vulkan-game.hpp

    r5049354 r914bb99  
    212212
    213213class VulkanGame {
     214
    214215   public:
    215216
     
    558559}
    559560
     561// This function sets all the normals for a face to be parallel
     562// This is good for models that should have distinct faces, but bad for models that should appear smooth
     563// Maybe add an option to set all copies of a point to have the same normal and have the direction of
     564// that normal be the weighted average of all the faces it is a part of, where the weight from each face
     565// is its surface area.
     566
     567// TODO: Since the current approach to normal calculation basicaly makes indexed drawing useless, see if it's
     568// feasible to automatically enable/disable indexed drawing based on which approach is used
    560569template<class VertexType>
    561570vector<VertexType> VulkanGame::addVertexNormals(vector<VertexType> vertices) {
Note: See TracChangeset for help on using the changeset viewer.