| 289 | } |
| 290 | |
| 291 | void SimplePostFX::preparePostFX(RenderContext* pRenderContext, uint32_t width, uint32_t height) |
| 292 | { |
| 293 | for (int res = 0; res < kNumLevels + 1; ++res) |
| 294 | { |
| 295 | ref<Texture>& pBuf = mpPyramid[res]; |
| 296 | if (getBloomAmount() <= 0.f) |
| 297 | { |
| 298 | pBuf = nullptr; |
| 299 | } |
| 300 | else |
| 301 | { |
| 302 | uint32_t w = std::max(1u, width >> res); |
| 303 | uint32_t h = std::max(1u, height >> res); |
| 304 | if (!pBuf || pBuf->getWidth() != w || pBuf->getHeight() != h) |
| 305 | { |
| 306 | pBuf = mpDevice->createTexture2D( |
| 307 | w, h, ResourceFormat::RGBA16Float, 1, 1, nullptr, ResourceBindFlags::ShaderResource | ResourceBindFlags::UnorderedAccess |
| 308 | ); |
| 309 | FALCOR_ASSERT(pBuf); |
| 310 | } |
| 311 | } |
| 312 | } |
| 313 | } |
| 314 | |
| 315 | void SimplePostFX::renderUI(Gui::Widgets& widget) |
| 316 | { |
nothing calls this directly
no test coverage detected