aboutsummaryrefslogtreecommitdiff
path: root/src/rendering/render_path.cpp
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2026-08-24 18:28:39 +0200
committerhachem <im@hachem.wtf>2026-08-24 18:28:39 +0200
commita34c49f103c8950a57687ea3d866c244d95b4414 (patch)
treeff268f4a7f52769a252443d6f2822c9814e3bb1c /src/rendering/render_path.cpp
parent06398a7a176e123506de6e8851866a8bec0b3427 (diff)
[docs]: added a few comments cause i wont be able to read this in a week's time
Diffstat (limited to 'src/rendering/render_path.cpp')
-rw-r--r--src/rendering/render_path.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/rendering/render_path.cpp b/src/rendering/render_path.cpp
index 8cb0328..dfd2937 100644
--- a/src/rendering/render_path.cpp
+++ b/src/rendering/render_path.cpp
@@ -42,15 +42,15 @@ namespace Donut
{
const glm::vec4 clear(0.05f, 0.06f, 0.10f, 1.0f);
- // The black hole is the only view with an off-screen pass; it renders (and
- // runs the expensive geodesic) ONLY on the Simulation tab. Scene and None
- // are a single swapchain pass — None draws nothing (empty viewport).
+ // the black hole is the only view with an off-screen pass; it renders (and
+ // runs the expensive geodesic) ONLY when the view is Simulation. scene and
+ // none are a single swapchain pass — none draws nothing (empty viewport).
if (view != View::BlackHole)
{
cmd.begin_render_pass(nullptr, clear);
if (view == View::Scene)
{
- // Projection was set by the Application this frame (shared with the gizmo).
+ // projection was set by the Application this frame (shared with the gizmo).
CameraView cv;
cv.view = scene.scene_camera.get_view_matrix();
cv.projection = scene.scene_camera.get_projection_matrix();
@@ -95,11 +95,11 @@ namespace Donut
m_scene_renderer.reset();
m_black_hole_renderer.reset();
m_cubemap.reset();
- // Backend-specific HDRI/GPU resource cleanup is the device's job (see e.g.
+ // backend-specific HDRI/GPU resource cleanup is the device's job (see e.g.
// the OpenGL device clearing the HDRIManager texture cache on shutdown).
}
- // Portable Float Map: a raw RGB float image (the actual physical values). Its
+ // Portable Float Map: a raw RGB float image (the actual physical values). its
// raster is bottom-up; -1.0 scale flags little-endian.
static auto write_pfm(const std::string& path, int w, int h, const std::vector<float>& rgba) -> bool
{
@@ -135,11 +135,11 @@ namespace Donut
{
if (!m_device) return 0;
const int w = std::max(cfg.width, 1), h = std::max(cfg.height, 1);
- const bool raw = cfg.format != ExportFormat::Png; // Pfm / Csv want physical values
+ const bool raw = cfg.format != ExportFormat::Png; // pfm / csv want physical values
auto target = m_device->create_render_target(
w, h, raw ? RHI::Format::RGBA32F : RHI::Format::RGBA8, RHI::Format::None, RHI::Filter::Nearest);
- // Full-quality geodesic view from the sim camera (moving = false = settled).
+ // full-quality geodesic view from the sim camera (moving = false = settled).
GeodesicView gv;
glm::vec3 pos, fwd;
if (scene.sim_camera.get_camera_mode() == CameraMode::FPS)
@@ -153,7 +153,7 @@ namespace Donut
gv.moving = false;
gv.time = 0.0f;
- std::error_code ec; std::filesystem::create_directories(cfg.directory, ec);
+ std::error_code ec; std::filesystem::create_directories(cfg.directory, ec); // lowk dc, the write below complains if it mattered
char stamp[32]; std::time_t t = std::time(nullptr);
std::strftime(stamp, sizeof(stamp), "%Y%m%d_%H%M%S", std::localtime(&t));
const char* ext = cfg.format == ExportFormat::Pfm ? "pfm" : cfg.format == ExportFormat::Csv ? "csv" : "png";