collect result images

This commit is contained in:
CDaut 2024-08-28 11:15:32 +02:00
parent 7250fe1dd0
commit 3300437294
Signed by: clara
GPG key ID: 223391B52FAD4463
343 changed files with 536 additions and 151 deletions

2
.idea/.name generated
View file

@ -1 +1 @@
UnicornTK vk_raytracing_tutorial

2
.idea/misc.xml generated
View file

@ -3,7 +3,7 @@
<component name="CMakePythonSetting"> <component name="CMakePythonSetting">
<option name="pythonIntegrationState" value="YES" /> <option name="pythonIntegrationState" value="YES" />
</component> </component>
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$/utk_experiments/utk"> <component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$/raytracer">
<contentRoot DIR="$PROJECT_DIR$" /> <contentRoot DIR="$PROJECT_DIR$" />
</component> </component>
<component name="CidrRootsConfiguration"> <component name="CidrRootsConfiguration">

View file

@ -29,14 +29,14 @@
"name":"Camera", "name":"Camera",
"rotation":[ "rotation":[
0, 0,
0.7071068286895752, 0.7071067094802856,
0, 0,
0.7071068286895752 0.7071068286895752
], ],
"translation":[ "translation":[
15, 5.538400650024414,
0, 2.8199868202209473,
0 -2.0413269996643066
] ]
} }
], ],

View file

@ -365,7 +365,7 @@ protected:
// Other // Other
bool m_showHelp{false}; // Show help, pressing bool m_showHelp{false}; // Show help, pressing
bool m_show_gui{true}; bool m_show_gui{false};
bool m_useDynamicRendering{false}; // Using VK_KHR_dynamic_rendering bool m_useDynamicRendering{false}; // Using VK_KHR_dynamic_rendering
float m_sceneRadius{1.f}; float m_sceneRadius{1.f};
}; };

View file

@ -194,7 +194,7 @@ void HelloVulkan::createGraphicsPipeline()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
// Loading the OBJ file and setting up all buffers // Loading the OBJ file and setting up all buffers
// //
void HelloVulkan::loadScene(const std::string& filename) void HelloVulkan::loadScene(const std::string& filename, const std::string &pointset_path)
{ {
using vkBU = VkBufferUsageFlagBits; using vkBU = VkBufferUsageFlagBits;
tinygltf::Model tmodel; tinygltf::Model tmodel;
@ -261,7 +261,7 @@ void HelloVulkan::loadScene(const std::string& filename)
// Creates all textures found // Creates all textures found
createTextureImages(cmdBuf, tmodel); createTextureImages(cmdBuf, tmodel);
//generate and submit pointset //generate and submit pointset
createPointsetImage(cmdBuf); createPointsetImage(cmdBuf, pointset_path);
cmdBufGet.submitAndWait(cmdBuf); cmdBufGet.submitAndWait(cmdBuf);
m_alloc.finalizeAndReleaseStaging(); m_alloc.finalizeAndReleaseStaging();
@ -342,7 +342,7 @@ void HelloVulkan::createTextureImages(const VkCommandBuffer& cmdBuf, tinygltf::M
} }
} }
void HelloVulkan::createPointsetImage(const VkCommandBuffer& cmdBuf) void HelloVulkan::createPointsetImage(const VkCommandBuffer& cmdBuf, const std::string& pointset_path)
{ {
//load pointset instead of generating it //load pointset instead of generating it
std::vector<vec2> points(m_size.height * m_size.width, vec2(0.f)); std::vector<vec2> points(m_size.height * m_size.width, vec2(0.f));
@ -359,17 +359,18 @@ void HelloVulkan::createPointsetImage(const VkCommandBuffer& cmdBuf)
//load huge pointset //load huge pointset
//auto pointset = utk::read_text_pointset<long double>("pointset_16384_tc_0.3_0.00002f.txt")[0]; //auto pointset = utk::read_text_pointset<long double>("pointset_16384_tc_0.3_0.00002f.txt")[0];
auto pointset = utk::read_text_pointset<long double>(pointset_path.c_str())[0];
//iterate pointset and fill texture //iterate pointset and fill texture
// for(int i = 0; i < pointset.Npts(); ++i) for(int i = 0; i < pointset.Npts(); ++i)
// { {
// auto point = std::make_pair(pointset[i][0] * (m_size.width - 1), pointset[i][1] * ((m_size.height) - 1)); auto point = std::make_pair(pointset[i][0] * (m_size.width - 1), pointset[i][1] * ((m_size.height) - 1));
// float_t wholex, wholey, fractionalx, fractionaly; float_t wholex, wholey, fractionalx, fractionaly;
// fractionalx = std::modf(point.first, &wholex); fractionalx = std::modf(point.first, &wholex);
// fractionaly = std::modf(point.second, &wholey); fractionaly = std::modf(point.second, &wholey);
//
// points[wholex + wholey * m_size.width] = vec2{fractionalx, fractionaly}; points[wholex + wholey * m_size.width] = vec2{fractionalx, fractionaly};
// } }
m_pointsetBuffer = m_alloc.createBuffer(cmdBuf, sizeof(glm::vec2) * points.size(), points.data(), m_pointsetBuffer = m_alloc.createBuffer(cmdBuf, sizeof(glm::vec2) * points.size(), points.data(),
VK_BUFFER_USAGE_STORAGE_BUFFER_BIT | VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT); VK_BUFFER_USAGE_STORAGE_BUFFER_BIT | VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT);

View file

@ -45,11 +45,11 @@ public:
void setup(const VkInstance& instance, const VkDevice& device, const VkPhysicalDevice& physicalDevice, uint32_t queueFamily) override; void setup(const VkInstance& instance, const VkDevice& device, const VkPhysicalDevice& physicalDevice, uint32_t queueFamily) override;
void createDescriptorSetLayout(); void createDescriptorSetLayout();
void createGraphicsPipeline(); void createGraphicsPipeline();
void loadScene(const std::string& filename); void loadScene(const std::string& filename, const std::string &pointset_path);
void updateDescriptorSet(); void updateDescriptorSet();
void createUniformBuffer(); void createUniformBuffer();
void createTextureImages(const VkCommandBuffer& cmdBuf, tinygltf::Model& gltfModel); void createTextureImages(const VkCommandBuffer& cmdBuf, tinygltf::Model& gltfModel);
void createPointsetImage(const VkCommandBuffer& cmdBuf); void createPointsetImage(const VkCommandBuffer& cmdBuf, const std::string &pointset_image);
void updateUniformBuffer(const VkCommandBuffer& cmdBuf); void updateUniformBuffer(const VkCommandBuffer& cmdBuf);
void onResize(int /*w*/, int /*h*/) override; void onResize(int /*w*/, int /*h*/) override;
void destroyResources(); void destroyResources();
@ -69,10 +69,10 @@ public:
// Information pushed at each draw call // Information pushed at each draw call
PushConstantRaster m_pcRaster{ PushConstantRaster m_pcRaster{
{1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1}, // Identity matrix {1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1}, // Identity matrix
{0.f, 100.f, 0.f}, // light position {0.f, 1.f, 0.f}, // light position
0, // instance Id 0, // instance Id
1000.f, // light intensity 1.f, // light intensity
0, // light type 1, // light type
0 // material id 0 // material id
}; };

View file

@ -23,6 +23,7 @@
// at the top of imgui.cpp. // at the top of imgui.cpp.
#include <array> #include <array>
#include <iostream>
#define IMGUI_DEFINE_MATH_OPERATORS #define IMGUI_DEFINE_MATH_OPERATORS
#include "backends/imgui_impl_glfw.h" #include "backends/imgui_impl_glfw.h"
@ -160,7 +161,8 @@ int main(int argc, char** argv)
// Creation of the example // Creation of the example
//FIXME: HERE WE CAN LOAD THE SCENE //FIXME: HERE WE CAN LOAD THE SCENE
helloVk.loadScene(nvh::findFile("media/scenes/grid.gltf", defaultSearchPaths, true)); std::cout << "Using pointset " << argv[1] << std::endl;
helloVk.loadScene(nvh::findFile("media/scenes/lumberyard.gltf", defaultSearchPaths, true), argv[1]);
// Setup camera // Setup camera
CameraManip.setWindowSize(SAMPLE_WIDTH, SAMPLE_HEIGHT); CameraManip.setWindowSize(SAMPLE_WIDTH, SAMPLE_HEIGHT);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,100 @@
0.560
0.565
0.565
0.560
0.565
0.565
0.565
0.565
0.560
0.565
0.560
0.560
0.565
0.560
0.565
0.565
0.565
0.565
0.565
0.565
0.565
0.565
0.565
0.565
0.565
0.565
0.565
0.565
0.560
0.565
0.565
0.565
0.565
0.560
0.565
0.565
0.565
0.565
0.565
0.565
0.565
0.565
0.560
0.565
0.565
0.565
0.565
0.565
0.565
0.565
0.560
0.560
0.560
0.565
0.565
0.565
0.565
0.565
0.565
0.565
0.565
0.560
0.560
0.565
0.565
0.565
0.560
0.565
0.560
0.565
0.565
0.565
0.565
0.565
0.565
0.565
0.565
0.560
0.565
0.565
0.565
0.560
0.560
0.565
0.565
0.560
0.565
0.565
0.565
0.565
0.565
0.565
0.565
0.565
0.560
0.565
0.565
0.565
0.565
0.565

View file

@ -0,0 +1,100 @@
0.555
0.560
0.555
0.560
0.560
0.560
0.555
0.550
0.555
0.560
0.560
0.560
0.560
0.560
0.555
0.555
0.560
0.555
0.555
0.555
0.560
0.560
0.560
0.555
0.560
0.560
0.555
0.555
0.550
0.555
0.560
0.555
0.560
0.560
0.555
0.560
0.560
0.560
0.550
0.555
0.555
0.560
0.555
0.555
0.560
0.560
0.560
0.560
0.555
0.560
0.555
0.560
0.560
0.555
0.560
0.560
0.555
0.560
0.555
0.560
0.560
0.560
0.560
0.560
0.560
0.555
0.560
0.560
0.560
0.560
0.560
0.560
0.555
0.560
0.560
0.560
0.555
0.560
0.560
0.550
0.560
0.560
0.560
0.560
0.550
0.550
0.560
0.555
0.555
0.560
0.560
0.560
0.560
0.545
0.555
0.555
0.560
0.555
0.555
0.560

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

Some files were not shown because too many files have changed in this diff Show more