Skip to content

Commit 197da09

Browse files
fix a bunch of typos
1 parent 24386d7 commit 197da09

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

examples_tests/39.DenoiserTonemapper/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ set(EXTRA_SOURCES
1919
CommandLineHandler.cpp
2020
../../src/nbl/ext/LumaMeter/CLumaMeter.cpp
2121
../../src/nbl/ext/ToneMapper/CToneMapper.cpp
22+
../../src/nbl/ext/FFT/FFT.cpp
2223
)
2324

2425
nbl_create_executable_project(

examples_tests/49.ComputeFFT/main.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -361,17 +361,16 @@ int main()
361361
);
362362
}();
363363

364-
float bloomScale = 1.f;
364+
float bloomScale = 0.5f;
365365
const auto kerDim = kerImageView->getCreationParameters().image->getCreationParameters().extent;
366366
const auto marginSrcDim = [srcDim,kerDim,bloomScale]() -> auto
367367
{
368368
auto tmp = srcDim;
369-
tmp.width += kerDim.width*bloomScale-1u;
370-
tmp.height += kerDim.height*bloomScale-1u;
371-
tmp.depth += kerDim.depth*bloomScale-1u;
369+
tmp.width += core::max(kerDim.width*bloomScale,1u)-1u;
370+
tmp.height += core::max(kerDim.height*bloomScale,1u)-1u;
371+
tmp.depth += core::max(kerDim.depth*bloomScale,1u)-1u;
372372
return tmp;
373373
}();
374-
bloomScale = 0.5;
375374
constexpr bool useHalfFloats = true;
376375
// Allocate Output Buffer
377376
auto fftOutputBuffer_0 = driver->createDeviceLocalGPUBufferOnDedMem(FFTClass::getOutputBufferSize(useHalfFloats,marginSrcDim,srcNumChannels));
@@ -654,7 +653,7 @@ int main()
654653
const auto paddedSrcDim = FFTClass::padDimensions(marginSrcDim);
655654
ivec2 unpad_offset = { 0,0 };
656655
for (auto i=0u; i<2u; i++)
657-
if (fftDispatchInfo[3].workGroupCount[i]>1u)
656+
if (fftDispatchInfo[2].workGroupCount[i]==1u)
658657
(&unpad_offset.x)[i] = ((&paddedSrcDim.width)[i]-(&srcDim.width)[i])>>1u;
659658
driver->pushConstants(lastFFTPipeline->getLayout(),ISpecializedShader::ESS_COMPUTE,offsetof(image_store_parameters_t,unpad_offset),sizeof(image_store_parameters_t::unpad_offset),&unpad_offset);
660659
}

0 commit comments

Comments
 (0)