aboutsummaryrefslogtreecommitdiff
path: root/src/rendering/black_hole_renderer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rendering/black_hole_renderer.cpp')
-rw-r--r--src/rendering/black_hole_renderer.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/rendering/black_hole_renderer.cpp b/src/rendering/black_hole_renderer.cpp
index 283435e..2310268 100644
--- a/src/rendering/black_hole_renderer.cpp
+++ b/src/rendering/black_hole_renderer.cpp
@@ -30,7 +30,7 @@ namespace Donut
m_geo_lo = device.create_render_target(GEO_LO_W, GEO_LO_H, Format::RGBA8, Format::None, Filter::Linear);
m_geo_hi = device.create_render_target(GEO_HI_W, GEO_HI_H, Format::RGBA8, Format::None, Filter::Linear);
- // Fullscreen quad shared by the geodesic and present passes: pos.xy + uv.
+ // fullscreen quad shared by the geodesic and present passes: pos.xy + uv.
const float quad[] = {
-1.f, 1.f, 0.f, 1.f, -1.f, -1.f, 0.f, 0.f, 1.f, -1.f, 1.f, 0.f,
-1.f, 1.f, 0.f, 1.f, 1.f, -1.f, 1.f, 0.f, 1.f, 1.f, 1.f, 1.f,
@@ -42,7 +42,7 @@ namespace Donut
m_obj_ubo = device.create_buffer(BufferType::Uniform, 800);
m_sim_ubo = device.create_buffer(BufferType::Uniform, 16);
- // The hole itself is the hardcoded singularity in the shader; the Objects
+ // the hole itself is the hardcoded singularity in the shader; the Objects
// UBO carries the Scene's spheres, refilled each frame in render_geodesic.
std::vector<uint8_t> obj(800, 0); // numObjects = 0 until the first frame
m_obj_ubo->update(obj.data(), obj.size());
@@ -85,13 +85,13 @@ namespace Donut
{
fill_uniforms(view, params, objects, 0, false); // channel 0 = colour, display
- // Progressive resolution: small target while moving, large once settled.
+ // progressive resolution: small target while moving so it stays snappy, big one once it settles. so like, smooth now vs crisp later.
RenderTarget* target = view.moving ? m_geo_lo.get() : m_geo_hi.get();
m_last_target = target;
draw_geodesic(cmd, target, cubemap, m_geo_pipeline.get());
}
- // Renders one channel (0 colour, 1 redshift, 2 temperature, 3 impact parameter)
+ // renders one channel (0 colour, 1 redshift, 2 temperature, 3 impact parameter)
// into an arbitrary RGBA8 target — used by the exporter for high-res output.
auto BlackHoleRenderer::render_export(RHI::CommandList& cmd, RHI::RenderTarget* target,
const GeodesicView& view, const BlackHoleParams& params,
@@ -114,9 +114,9 @@ namespace Donut
cam.raw = raw ? 1 : 0;
m_cam_ubo->update(&cam, sizeof(cam));
- // Same integration budget whether moving or settled (the disk vanishes at
+ // same integration budget whether moving or settled (the disk vanishes at
// steep poses below ~15000 steps); responsiveness comes from the lower-res
- // target instead. Sourced from the UI, clamped GPU-safe.
+ // target instead. sourced from the UI, clamped GPU-safe.
constexpr int kStepCeil = 15000;
SimUBO sim{};
sim.steps_static = std::clamp(params.quality_steps, 1000, kStepCeil);
@@ -125,7 +125,7 @@ namespace Donut
sim.time = view.time;
m_sim_ubo->update(&sim, sizeof(sim));
- // Disk struct: r_in, r_out, turbulence, slab half-thickness, brightness,
+ // disk struct: r_in, r_out, turbulence, slab half-thickness, brightness,
// temperature (radii in Schwarzschild radii).
float disk[8] = {
std::max(params.disk_inner_rs, 3.0f) * SagA_rs,
@@ -138,8 +138,8 @@ namespace Donut
};
m_disk_ubo->update(disk, sizeof(disk));
- // Scene objects → the geodesic's Objects UBO (std140: numObjects@0,
- // objPosRadius[i]@16+16i, objColor[i]@272+16i). They render as spheres the
+ // scene objects → the geodesic's Objects UBO (std140: numObjects@0,
+ // objPosRadius[i]@16+16i, objColor[i]@272+16i). they render as spheres the
// curved rays intersect, so the hole lenses them. 1 scene unit = 1 r_s.
const float k = SagA_rs / SCENE_UNITS_PER_RS; // scene units -> metres
std::vector<uint8_t> objbuf(800, 0);