添加双纹理采样
This commit is contained in:
@@ -38,6 +38,9 @@
|
||||
#include <mutex>
|
||||
#include <chrono>
|
||||
#include <ctime>
|
||||
#include <cmath>
|
||||
#include <unordered_map>
|
||||
#include <array>
|
||||
|
||||
void VK_CHECK(VkResult ret);
|
||||
|
||||
@@ -51,6 +54,13 @@ struct QueueFamilyIndices {
|
||||
}
|
||||
};
|
||||
|
||||
struct TextureLoadingVertexStructure
|
||||
{
|
||||
float pos[3];
|
||||
float uv[2];
|
||||
float normal[3];
|
||||
};
|
||||
|
||||
class AppBase
|
||||
{
|
||||
public:
|
||||
@@ -81,6 +91,15 @@ protected:
|
||||
|
||||
bool enableValidationLayers = true;
|
||||
VkDebugUtilsMessengerEXT debugMessenger;
|
||||
|
||||
|
||||
// 计算面的法线
|
||||
void calculateFaceNormal(const TextureLoadingVertexStructure& v0, const TextureLoadingVertexStructure& v1, const TextureLoadingVertexStructure& v2, float* outNormal);
|
||||
|
||||
|
||||
// 计算所有顶点的法线
|
||||
void calculateVertexNormals(std::vector<TextureLoadingVertexStructure>& obj_vertices, const std::vector<uint32_t>& obj_indices);
|
||||
|
||||
};
|
||||
|
||||
#endif // VULKAN_UTILS_H
|
||||
Reference in New Issue
Block a user