@@ -361,17 +361,16 @@ int main()
361
361
);
362
362
}();
363
363
364
- float bloomScale = 1 . f ;
364
+ float bloomScale = 0 . 5f ;
365
365
const auto kerDim = kerImageView->getCreationParameters ().image ->getCreationParameters ().extent ;
366
366
const auto marginSrcDim = [srcDim,kerDim,bloomScale]() -> auto
367
367
{
368
368
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 ;
372
372
return tmp;
373
373
}();
374
- bloomScale = 0.5 ;
375
374
constexpr bool useHalfFloats = true ;
376
375
// Allocate Output Buffer
377
376
auto fftOutputBuffer_0 = driver->createDeviceLocalGPUBufferOnDedMem (FFTClass::getOutputBufferSize (useHalfFloats,marginSrcDim,srcNumChannels));
@@ -654,7 +653,7 @@ int main()
654
653
const auto paddedSrcDim = FFTClass::padDimensions (marginSrcDim);
655
654
ivec2 unpad_offset = { 0 ,0 };
656
655
for (auto i=0u ; i<2u ; i++)
657
- if (fftDispatchInfo[3 ].workGroupCount [i]> 1u )
656
+ if (fftDispatchInfo[2 ].workGroupCount [i]== 1u )
658
657
(&unpad_offset.x )[i] = ((&paddedSrcDim.width )[i]-(&srcDim.width )[i])>>1u ;
659
658
driver->pushConstants (lastFFTPipeline->getLayout (),ISpecializedShader::ESS_COMPUTE,offsetof (image_store_parameters_t ,unpad_offset),sizeof (image_store_parameters_t ::unpad_offset),&unpad_offset);
660
659
}
0 commit comments