From 2e99a39aad9b82cef3e9575ad69c4735c2199902 Mon Sep 17 00:00:00 2001 From: shun-iwasawa Date: Thu, 19 Aug 2021 17:01:16 +0900 Subject: [PATCH] fix bokeh fx artifacts --- toonz/sources/stdfx/iwa_bokeh_advancedfx.cpp | 5 +++-- toonz/sources/stdfx/iwa_bokehfx.cpp | 5 +++-- toonz/sources/stdfx/iwa_bokehreffx.cpp | 4 +++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/toonz/sources/stdfx/iwa_bokeh_advancedfx.cpp b/toonz/sources/stdfx/iwa_bokeh_advancedfx.cpp index 5ff077dd..7fd6e433 100644 --- a/toonz/sources/stdfx/iwa_bokeh_advancedfx.cpp +++ b/toonz/sources/stdfx/iwa_bokeh_advancedfx.cpp @@ -232,11 +232,12 @@ void Iwa_BokehAdvancedFx::doCompute(TTile& tile, double frame, // compute the input tiles QMap sourceTiles; + TRenderSettings infoOnInput(settings); + infoOnInput.m_bpp = 64; for (auto index : sourceIndices) { TTile* layerTile = new TTile(); m_layerParams[index].m_source->allocateAndCompute( - *layerTile, _rectOut.getP00(), dimOut, tile.getRaster(), frame, - settings); + *layerTile, _rectOut.getP00(), dimOut, 0, frame, infoOnInput); sourceTiles[index] = layerTile; } diff --git a/toonz/sources/stdfx/iwa_bokehfx.cpp b/toonz/sources/stdfx/iwa_bokehfx.cpp index c9616999..79848ba5 100644 --- a/toonz/sources/stdfx/iwa_bokehfx.cpp +++ b/toonz/sources/stdfx/iwa_bokehfx.cpp @@ -136,11 +136,12 @@ void Iwa_BokehFx::doCompute(TTile& tile, double frame, //---------------------------- // Compute the input tiles first QMap sourceTiles; + TRenderSettings infoOnInput(settings); + infoOnInput.m_bpp = 64; for (auto index : sourceIndices) { TTile* layerTile = new TTile(); m_layerParams[index].m_source->allocateAndCompute( - *layerTile, _rectOut.getP00(), dimOut, tile.getRaster(), frame, - settings); + *layerTile, _rectOut.getP00(), dimOut, 0, frame, infoOnInput); sourceTiles[index] = layerTile; } diff --git a/toonz/sources/stdfx/iwa_bokehreffx.cpp b/toonz/sources/stdfx/iwa_bokehreffx.cpp index 079c0a37..a7007eb6 100644 --- a/toonz/sources/stdfx/iwa_bokehreffx.cpp +++ b/toonz/sources/stdfx/iwa_bokehreffx.cpp @@ -146,11 +146,13 @@ void Iwa_BokehRefFx::doCompute(TTile& tile, double frame, // rasterList.append(allocateRasterAndLock(&source_buff, dimOut)); LayerValue layerValue; + TRenderSettings infoOnInput(settings); + infoOnInput.m_bpp = 64; // source tile is used only in this focus. // normalized source image data is stored in source_buff. layerValue.sourceTile = new TTile(); m_source->allocateAndCompute(*layerValue.sourceTile, rectOut.getP00(), dimOut, - tile.getRaster(), frame, settings); + 0, frame, infoOnInput); // - - - iris image - - - // Get the original size of Iris image