pull/2/head
ink-soul 2023-05-25 16:13:37 +08:00
parent 310ab79454
commit 0ed950f7c1
2 changed files with 730 additions and 817 deletions

File diff suppressed because it is too large Load Diff

View File

@ -216,15 +216,15 @@ public:
void loadMaterials(tinygltf::Model& input);
Node* findNode(Node* parent, uint32_t index);
Node* nodeFromIndex(uint32_t index);
void loadSkins(tinygltf::Model& input);
//void loadSkins(tinygltf::Model& input);
void loadAnimations(tinygltf::Model& input);
void loadNode(const tinygltf::Node& inputNode, const tinygltf::Model& input, VulkanglTFModel::Node* parent, uint32_t nodeIndex, std::vector<uint32_t>& indexBuffer, std::vector<VulkanglTFModel::Vertex>& vertexBuffer);
glm::mat4 getNodeMatrix(VulkanglTFModel::Node* node);
void updateNodeMatrix(Node* node, std::vector<glm::mat4>& nodeMatrics);
void updateJoints(VulkanglTFModel::Node* node);
void updateAnimation(float deltaTime,vks::Buffer buffer);
void drawNode(VkCommandBuffer commandBuffer, VkPipelineLayout pipelineLayout, VulkanglTFModel::Node node);
void draw(VkCommandBuffer commandBuffer, VkPipelineLayout pipelineLayout);
//void updateJoints(VulkanglTFModel::Node* node);
void updateAnimation(float deltaTime, vks::Buffer& buffer);
void drawNode(VkCommandBuffer commandBuffer, VkPipelineLayout pipelineLayout, VulkanglTFModel::Node* node, bool bPushConstants);
void draw(VkCommandBuffer commandBuffer, VkPipelineLayout pipelineLayout, bool flag);
};
class VulkanExample : public VulkanExampleBase
@ -344,7 +344,7 @@ public:
// Sampling deltas
float deltaPhi = (2.0f * float(M_PI)) / 180.0f;
float deltaTheta = (0.5f * float(M_PI)) / 64.0f;
} irradinacePushBlock;
} irradiancePushBlock;
struct PrefilterPushBlock {
glm::mat4 mvp;
@ -383,7 +383,7 @@ public:
shaderData.buffer.destroy();
shaderData.skinSSBO.destroy();
}
void loadglTFFile(std::string filename, VulkanglTFModel& model, bool bSkyboxFlag = false);
void loadglTFFile(std::string filename, VulkanglTFModel& model, bool bSkyboxFlag);
virtual void getEnabledFeatures();
void createAttachment(VkFormat format, VkImageUsageFlagBits usage, FrameBufferAttachment* attachment, uint32_t width, uint32_t height);
virtual void setupFrameBuffer();
@ -391,10 +391,10 @@ public:
void loadAssets();
void setupDescriptors();
void preparePipelines();
void prepareToneMappingPipeline();
void generateIrradianceCubemap();
void generatePrefilteredCubemap();
void generateBRDFLUT();
void CreateToneMappingPipeline();
void GenerateIrradianceCubemap();
void GeneratePrefilteredCubemap();
void GenerateBRDFLUT();
void prepareUniformBuffers();
void updateUniformBuffers();
void prepare();