Skip to content

Commit 1f69142

Browse files
committed
fix incorrect frame dims used for offline renders
1 parent ca1a469 commit 1f69142

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

tsd/apps/interactive/common/AppCore.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ void AppCore::OfflineRenderSequenceConfig::loadSettings(
457457
{
458458
auto &frameRoot = root["frame"];
459459
frameRoot["width"].getValue(ANARI_UINT32, &frame.width);
460-
frameRoot["width"].getValue(ANARI_UINT32, &frame.height);
460+
frameRoot["height"].getValue(ANARI_UINT32, &frame.height);
461461
frameRoot["colorFormat"].getValue(ANARI_DATA_TYPE, &frame.colorFormat);
462462
frameRoot["samples"].getValue(ANARI_UINT32, &frame.samples);
463463

tsd/apps/tools/tsdRender.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,19 +209,19 @@ static void setupCameraManipulator()
209209

210210
static void setupRenderPipeline()
211211
{
212-
printf("Setting up render pipeline...");
213-
fflush(stdout);
214-
215212
const auto frameWidth = g_core->offline.frame.width;
216213
const auto frameHeight = g_core->offline.frame.height;
217214

215+
printf("Setting up render pipeline (%u x %u)...", frameWidth, frameHeight);
216+
fflush(stdout);
217+
218218
g_timer.start();
219219
g_renderPipeline =
220220
std::make_unique<tsd::RenderPipeline>(frameWidth, frameHeight);
221221

222222
g_camera = anari::newObject<anari::Camera>(g_device, "perspective");
223223
anari::setParameter(
224-
g_device, g_camera, "aspect", frameWidth / float(frameWidth));
224+
g_device, g_camera, "aspect", frameWidth / float(frameHeight));
225225
anari::setParameter(g_device, g_camera, "fovy", anari::radians(40.f));
226226
anari::commitParameters(g_device, g_camera);
227227

0 commit comments

Comments
 (0)