diff --git a/include/merian-nodes/nodes/image_write/image_write.hpp b/include/merian-nodes/nodes/image_write/image_write.hpp index 05756ed..42ecf13 100644 --- a/include/merian-nodes/nodes/image_write/image_write.hpp +++ b/include/merian-nodes/nodes/image_write/image_write.hpp @@ -44,6 +44,7 @@ class ImageWrite : public Node { private: template void get_format_args(const T& consumer, + const vk::Extent3D& input_extent, const vk::Extent3D& output_extent, const uint64_t run_iteration, const std::chrono::nanoseconds& graph_time_since_record, @@ -56,6 +57,8 @@ class ImageWrite : public Node { consumer(fmt::arg("graph_time", to_seconds(graph_time))); consumer(fmt::arg("graph_time_since_record", to_seconds(graph_time_since_record))); consumer(fmt::arg("system_time_since_record", to_seconds(system_time_since_record))); + consumer(fmt::arg("input_width", input_extent.width)); + consumer(fmt::arg("input_height", input_extent.height)); consumer(fmt::arg("output_width", output_extent.width)); consumer(fmt::arg("output_height", output_extent.height)); consumer(fmt::arg("random", rand())); diff --git a/src/merian-nodes/nodes/image_write/image_write.cpp b/src/merian-nodes/nodes/image_write/image_write.cpp index a705e88..0f1c394 100644 --- a/src/merian-nodes/nodes/image_write/image_write.cpp +++ b/src/merian-nodes/nodes/image_write/image_write.cpp @@ -136,8 +136,9 @@ void ImageWrite::process(GraphRun& run, const ImageHandle src = io[con_src]; vk::Extent3D scaled = max(multiply(src->get_extent(), scale), {1, 1, 1}); fmt::dynamic_format_arg_store arg_store; - get_format_args([&](const auto& arg) { arg_store.push_back(arg); }, scaled, run.get_iteration(), - graph_time_since_record, graph_time, system_time_since_record); + get_format_args([&](const auto& arg) { arg_store.push_back(arg); }, src->get_extent(), scaled, + run.get_iteration(), graph_time_since_record, graph_time, + system_time_since_record); std::filesystem::path path; try { if (filename_format.empty()) { @@ -322,11 +323,11 @@ ImageWrite::NodeStatusFlags ImageWrite::properties([[maybe_unused]] Properties& std::ignore = config.config_text("filename", filename_format, false, "Provide a format string for the path."); std::vector variables; - get_format_args([&](const auto& arg) { variables.push_back(arg.name); }, {1920, 1080, 1}, 1, - 1000ns, 1000ns, 1000ns); + get_format_args([&](const auto& arg) { variables.push_back(arg.name); }, {1920, 1080, 1}, + {1920, 1080, 1}, 1, 1000ns, 1000ns, 1000ns); fmt::dynamic_format_arg_store arg_store; - get_format_args([&](const auto& arg) { arg_store.push_back(arg); }, {1920, 1080, 1}, 1, 1000ns, - 1000ns, 1000ns); + get_format_args([&](const auto& arg) { arg_store.push_back(arg); }, {1920, 1080, 1}, + {1920, 1080, 1}, 1, 1000ns, 1000ns, 1000ns); std::filesystem::path abs_path; try {