diff options
| author | Quentin LADEVIE <qladevie@wanadev.fr> | 2025-12-26 15:07:38 +0100 |
|---|---|---|
| committer | Quentin LADEVIE <qladevie@wanadev.fr> | 2025-12-26 15:07:38 +0100 |
| commit | 013077e33d9fabc0033b79e73fe6cfc99dd333a6 (patch) | |
| tree | ac6f10bae775c9eefbe340f2e15ffad62b6f662c /api-test/main.cpp | |
| parent | b4d24e8f2cb4838acc0b827f007e7faa609039ba (diff) | |
Add physical devices limits tests
Complete transmittance LUT computation shaders
Diffstat (limited to 'api-test/main.cpp')
| -rw-r--r-- | api-test/main.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/api-test/main.cpp b/api-test/main.cpp index 12deac1..2137ffb 100644 --- a/api-test/main.cpp +++ b/api-test/main.cpp @@ -68,6 +68,8 @@ RENDERDOC_API_1_6_0 *rdoc_api = nullptr; static constexpr size_t Kb = 1024U; static constexpr size_t Mb = 1024U * Kb; +static uintptr_t transmittance_LUT_tex_id = 0U; + void ui(uint64_t frame_time) { static float max_fps = 0.f; static uint64_t max_frame_time = 1000U; @@ -79,14 +81,13 @@ void ui(uint64_t frame_time) { max_frame_time = frame_time; } ImGui::NewFrame(); - bool open = true; ImGui::Text("FPS : %f\n", fps); ImGui::Text("Max FPS : %f\n", max_fps); ImGui::Text("frame_time : %f ms\n", frame_time / 1000.f); ImGui::Text("max frame_time : %f ms\n", max_frame_time / 1000.f); ImGui::Text("LUT"); - ImGui::Image(45, ImVec2(128, 128)); + ImGui::Image(transmittance_LUT_tex_id, ImVec2(128, 128)); ImGui::EndFrame(); ImGui::Render(); } @@ -394,6 +395,7 @@ int main() { .name = "transmittance_lut", }); device_texture transmittance_lut = device.get_texture(transmittance_lut_handle); + transmittance_LUT_tex_id = transmittance_lut.get_sampled_index(); std::vector<uint8_t> transmittance_lut_code = read_file("shaders/transmittance_lut.comp.spv"); handle<device_pipeline> transmittance_lut_compute = device.create_compute_pipeline({ |
