Optix denoiser implementation exhibits black square artifacts

I integrated Optix denoiser inside my path tracer using Optix 8.0.0 and Cuda 12.6.
While I get decent results with some scenes, I get black square artefacts on some other scenes after several path tracing samples.

Please see this video for a demo description:
https://www.dropbox.com/scl/fi/u9cjtutafd2835nx4cvxa/optix_issue.mp4?rlkey=65yjubk2vprllf2ko27qmfecw&st=88bqlsae&dl=0

At 100 samples per pixel(glitch is already there) gbuffer/aovs looks like this:
https://www.dropbox.com/scl/fi/j94a6mnib7ddcgugb2wmq/gBuffer.zip?rlkey=x4b1985pp276hmc6c9t5la6f0&st=6y9e3jp3&dl=0
Meaning the denoiser input is good.

What am I missing? My implementation is straightforward. I use the unmodified denoiser wrapper from the toolkit(OptiXDenoiser.h).

Header

#include "OptiXDenoiser.h"//SDK wrapper

struct NvidiaOptixDenoiser
{
    NvidiaOptixDenoiser();
    ~NvidiaOptixDenoiser();

    void denoise(Graphics::Texture::Image& imageOut, const DenoisingArgs& denoisingArgs);

private:
    OptiXDenoiser* m_denoiser = nullptr;
    nbBool m_firstFrame = true;
};

CPP:

NvidiaOptixDenoiser::NvidiaOptixDenoiser()
{
    m_denoiser = new OptiXDenoiser();
}

NvidiaOptixDenoiser::~NvidiaOptixDenoiser()
{
    m_denoiser->finish();
    delete m_denoiser;
}

void NvidiaOptixDenoiser::denoise(Graphics::Texture::Image& imageOut, const DenoisingArgs& denoisingArgs)
{
    ASSERT(imageOut.getFormat() == ImageFormat::RGB32F);
    RGB32FImage* imageRGBFOut = dynamic_cast<RGB32FImage*>(&imageOut);
    ASSERT(imageRGBFOut);

    const Graphics::GBuffer* gBuffer = denoisingArgs.gBuffer;
    ASSERT(gBuffer);

    const std::unique_ptr<Graphics::Texture::RGB32FImage>& imageIn = gBuffer->m_radiance;

    const Uint32 width = imageOut.getWidth();
    const Uint32 height = imageOut.getHeight();

    //-----------------------------------------------------------------------------------------------------------------------------------------------------
    // Build the input images. Optix Denoiser only support FLOAT4. Maybe just a limitation of the wrapper?
    //-----------------------------------------------------------------------------------------------------------------------------------------------------
    RGBA32FImage optixSrcColor(width, height);
    RGBA32FImage optixNormals(width, height);
    RGBA32FImage optixAlbedo(width, height);
    RGBA32FImage optixFlow(width, height);
    const Uint32 optixNbPixels = width * height;

    tbb::parallel_for(size_t(0), size_t(optixNbPixels), [&](size_t tbbIdx) {
        const Uint32 pixelIdx = (nbUint32)tbbIdx;

        const Uint32 pixelPosX = (nbUint32)(pixelIdx % width);
        const Uint32 pixelPosY = (nbUint32)(pixelIdx / width);
        const Math::Uvec2 pixelPos = Math::Uvec2(pixelPosX, pixelPosY);

        {
            // In color.
            {
                const RGBFColor color = imageIn->getPixelFromPosition(pixelPos);
                optixSrcColor.setPixelFromPosition(RGBAFColor(color.x, color.y, color.z, 0.0f), pixelPos);
            }

            // Normals.
            {
                const RGBFColor normal = gBuffer->m_normals->getPixelFromPosition(pixelPos);
                optixNormals.setPixelFromPosition(RGBAFColor(normal.x, normal.y, normal.z, 0.0f), pixelPos);
            }

            // Albedo.
            {
                const RGBFColor albedo = gBuffer->m_albedo->getPixelFromPosition(pixelPos);
                optixAlbedo.setPixelFromPosition(RGBAFColor(albedo.x, albedo.y, albedo.z, 0.0f), pixelPos);
            }

            // In flow. They are motion vectors
            {
                const RGBFColor flow = denoisingArgs.gBuffer->m_motionVectors->getPixelFromPosition(pixelPos);
                optixFlow.setPixelFromPosition(RGBAFColor(flow.x, flow.y, flow.z, 0.0f), pixelPos);
            }
        }
    });

    //-----------------------------------------------------------------------------------------------------------------------------------------------------
    // Build the Optix input data
    //-----------------------------------------------------------------------------------------------------------------------------------------------------

    RGBA32FImage optixDestColor(width, height);

    OptiXDenoiser::Data optixDenoisingData;
    optixDenoisingData.width = width;
    optixDenoisingData.height = height;
    optixDenoisingData.color = reinterpret_cast<const float*>(optixSrcColor.getRawData());
    optixDenoisingData.normal = reinterpret_cast<const float*>(optixNormals.getRawData());
    optixDenoisingData.albedo = reinterpret_cast<const float*>(optixAlbedo.getRawData());
    optixDenoisingData.flow = reinterpret_cast<const float*>(optixFlow.getRawData());

    optixDenoisingData.outputs.push_back(reinterpret_cast<float*>(optixDestColor.getMutableRawData()));

    //-----------------------------------------------------------------------------------------------------------------------------------------------------
    // Perform denoising
    //-----------------------------------------------------------------------------------------------------------------------------------------------------
    if (m_firstFrame)
    {
        m_denoiser->init(optixDenoisingData, 0, 0, false, true, false, false, 0, false);
        m_firstFrame = false;
    }
    else
    {
        m_denoiser->update(optixDenoisingData);
    }

    m_denoiser->exec();
    m_denoiser->getResults();

    //-----------------------------------------------------------------------------------------------------------------------------------------------------
    // Read back results
    //-----------------------------------------------------------------------------------------------------------------------------------------------------
    tbb::parallel_for(size_t(0), size_t(optixNbPixels), [&](size_t tbbIdx) {
        const Uint32 pixelIdx = (nbUint32)tbbIdx;

        const Uint32 pixelPosX = (nbUint32)(pixelIdx % width);
        const Uint32 pixelPosY = (nbUint32)(pixelIdx / width);
        const Math::Uvec2 pixelPos = Math::Uvec2(pixelPosX, pixelPosY);

        const RGBAFColor color = optixDestColor.getPixelFromPosition(pixelPos);
        imageRGBFOut->setPixelFromPosition(RGBFColor(color.x, color.y, color.z), pixelPos);
    });
}

Thanks for helping!

4

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa

Optix denoiser implementation exhibits black square artifacts

I integrated Optix denoiser inside my path tracer using Optix 8.0.0 and Cuda 12.6.
While I get decent results with some scenes, I get black square artefacts on some other scenes after several path tracing samples.

Please see this video for a demo description:
https://www.dropbox.com/scl/fi/u9cjtutafd2835nx4cvxa/optix_issue.mp4?rlkey=65yjubk2vprllf2ko27qmfecw&st=88bqlsae&dl=0

At 100 samples per pixel(glitch is already there) gbuffer/aovs looks like this:
https://www.dropbox.com/scl/fi/j94a6mnib7ddcgugb2wmq/gBuffer.zip?rlkey=x4b1985pp276hmc6c9t5la6f0&st=6y9e3jp3&dl=0
Meaning the denoiser input is good.

What am I missing? My implementation is straightforward. I use the unmodified denoiser wrapper from the toolkit(OptiXDenoiser.h).

Header

#include "OptiXDenoiser.h"//SDK wrapper

struct NvidiaOptixDenoiser
{
    NvidiaOptixDenoiser();
    ~NvidiaOptixDenoiser();

    void denoise(Graphics::Texture::Image& imageOut, const DenoisingArgs& denoisingArgs);

private:
    OptiXDenoiser* m_denoiser = nullptr;
    nbBool m_firstFrame = true;
};

CPP:

NvidiaOptixDenoiser::NvidiaOptixDenoiser()
{
    m_denoiser = new OptiXDenoiser();
}

NvidiaOptixDenoiser::~NvidiaOptixDenoiser()
{
    m_denoiser->finish();
    delete m_denoiser;
}

void NvidiaOptixDenoiser::denoise(Graphics::Texture::Image& imageOut, const DenoisingArgs& denoisingArgs)
{
    ASSERT(imageOut.getFormat() == ImageFormat::RGB32F);
    RGB32FImage* imageRGBFOut = dynamic_cast<RGB32FImage*>(&imageOut);
    ASSERT(imageRGBFOut);

    const Graphics::GBuffer* gBuffer = denoisingArgs.gBuffer;
    ASSERT(gBuffer);

    const std::unique_ptr<Graphics::Texture::RGB32FImage>& imageIn = gBuffer->m_radiance;

    const Uint32 width = imageOut.getWidth();
    const Uint32 height = imageOut.getHeight();

    //-----------------------------------------------------------------------------------------------------------------------------------------------------
    // Build the input images. Optix Denoiser only support FLOAT4. Maybe just a limitation of the wrapper?
    //-----------------------------------------------------------------------------------------------------------------------------------------------------
    RGBA32FImage optixSrcColor(width, height);
    RGBA32FImage optixNormals(width, height);
    RGBA32FImage optixAlbedo(width, height);
    RGBA32FImage optixFlow(width, height);
    const Uint32 optixNbPixels = width * height;

    tbb::parallel_for(size_t(0), size_t(optixNbPixels), [&](size_t tbbIdx) {
        const Uint32 pixelIdx = (nbUint32)tbbIdx;

        const Uint32 pixelPosX = (nbUint32)(pixelIdx % width);
        const Uint32 pixelPosY = (nbUint32)(pixelIdx / width);
        const Math::Uvec2 pixelPos = Math::Uvec2(pixelPosX, pixelPosY);

        {
            // In color.
            {
                const RGBFColor color = imageIn->getPixelFromPosition(pixelPos);
                optixSrcColor.setPixelFromPosition(RGBAFColor(color.x, color.y, color.z, 0.0f), pixelPos);
            }

            // Normals.
            {
                const RGBFColor normal = gBuffer->m_normals->getPixelFromPosition(pixelPos);
                optixNormals.setPixelFromPosition(RGBAFColor(normal.x, normal.y, normal.z, 0.0f), pixelPos);
            }

            // Albedo.
            {
                const RGBFColor albedo = gBuffer->m_albedo->getPixelFromPosition(pixelPos);
                optixAlbedo.setPixelFromPosition(RGBAFColor(albedo.x, albedo.y, albedo.z, 0.0f), pixelPos);
            }

            // In flow. They are motion vectors
            {
                const RGBFColor flow = denoisingArgs.gBuffer->m_motionVectors->getPixelFromPosition(pixelPos);
                optixFlow.setPixelFromPosition(RGBAFColor(flow.x, flow.y, flow.z, 0.0f), pixelPos);
            }
        }
    });

    //-----------------------------------------------------------------------------------------------------------------------------------------------------
    // Build the Optix input data
    //-----------------------------------------------------------------------------------------------------------------------------------------------------

    RGBA32FImage optixDestColor(width, height);

    OptiXDenoiser::Data optixDenoisingData;
    optixDenoisingData.width = width;
    optixDenoisingData.height = height;
    optixDenoisingData.color = reinterpret_cast<const float*>(optixSrcColor.getRawData());
    optixDenoisingData.normal = reinterpret_cast<const float*>(optixNormals.getRawData());
    optixDenoisingData.albedo = reinterpret_cast<const float*>(optixAlbedo.getRawData());
    optixDenoisingData.flow = reinterpret_cast<const float*>(optixFlow.getRawData());

    optixDenoisingData.outputs.push_back(reinterpret_cast<float*>(optixDestColor.getMutableRawData()));

    //-----------------------------------------------------------------------------------------------------------------------------------------------------
    // Perform denoising
    //-----------------------------------------------------------------------------------------------------------------------------------------------------
    if (m_firstFrame)
    {
        m_denoiser->init(optixDenoisingData, 0, 0, false, true, false, false, 0, false);
        m_firstFrame = false;
    }
    else
    {
        m_denoiser->update(optixDenoisingData);
    }

    m_denoiser->exec();
    m_denoiser->getResults();

    //-----------------------------------------------------------------------------------------------------------------------------------------------------
    // Read back results
    //-----------------------------------------------------------------------------------------------------------------------------------------------------
    tbb::parallel_for(size_t(0), size_t(optixNbPixels), [&](size_t tbbIdx) {
        const Uint32 pixelIdx = (nbUint32)tbbIdx;

        const Uint32 pixelPosX = (nbUint32)(pixelIdx % width);
        const Uint32 pixelPosY = (nbUint32)(pixelIdx / width);
        const Math::Uvec2 pixelPos = Math::Uvec2(pixelPosX, pixelPosY);

        const RGBAFColor color = optixDestColor.getPixelFromPosition(pixelPos);
        imageRGBFOut->setPixelFromPosition(RGBFColor(color.x, color.y, color.z), pixelPos);
    });
}

Thanks for helping!

4

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa

Optix denoiser implementation exhibits black square artifacts

I integrated Optix denoiser inside my path tracer using Optix 8.0.0 and Cuda 12.6.
While I get decent results with some scenes, I get black square artefacts on some other scenes after several path tracing samples.

Please see this video for a demo description:
https://www.dropbox.com/scl/fi/u9cjtutafd2835nx4cvxa/optix_issue.mp4?rlkey=65yjubk2vprllf2ko27qmfecw&st=88bqlsae&dl=0

At 100 samples per pixel(glitch is already there) gbuffer/aovs looks like this:
https://www.dropbox.com/scl/fi/j94a6mnib7ddcgugb2wmq/gBuffer.zip?rlkey=x4b1985pp276hmc6c9t5la6f0&st=6y9e3jp3&dl=0
Meaning the denoiser input is good.

What am I missing? My implementation is straightforward. I use the unmodified denoiser wrapper from the toolkit(OptiXDenoiser.h).

Header

#include "OptiXDenoiser.h"//SDK wrapper

struct NvidiaOptixDenoiser
{
    NvidiaOptixDenoiser();
    ~NvidiaOptixDenoiser();

    void denoise(Graphics::Texture::Image& imageOut, const DenoisingArgs& denoisingArgs);

private:
    OptiXDenoiser* m_denoiser = nullptr;
    nbBool m_firstFrame = true;
};

CPP:

NvidiaOptixDenoiser::NvidiaOptixDenoiser()
{
    m_denoiser = new OptiXDenoiser();
}

NvidiaOptixDenoiser::~NvidiaOptixDenoiser()
{
    m_denoiser->finish();
    delete m_denoiser;
}

void NvidiaOptixDenoiser::denoise(Graphics::Texture::Image& imageOut, const DenoisingArgs& denoisingArgs)
{
    ASSERT(imageOut.getFormat() == ImageFormat::RGB32F);
    RGB32FImage* imageRGBFOut = dynamic_cast<RGB32FImage*>(&imageOut);
    ASSERT(imageRGBFOut);

    const Graphics::GBuffer* gBuffer = denoisingArgs.gBuffer;
    ASSERT(gBuffer);

    const std::unique_ptr<Graphics::Texture::RGB32FImage>& imageIn = gBuffer->m_radiance;

    const Uint32 width = imageOut.getWidth();
    const Uint32 height = imageOut.getHeight();

    //-----------------------------------------------------------------------------------------------------------------------------------------------------
    // Build the input images. Optix Denoiser only support FLOAT4. Maybe just a limitation of the wrapper?
    //-----------------------------------------------------------------------------------------------------------------------------------------------------
    RGBA32FImage optixSrcColor(width, height);
    RGBA32FImage optixNormals(width, height);
    RGBA32FImage optixAlbedo(width, height);
    RGBA32FImage optixFlow(width, height);
    const Uint32 optixNbPixels = width * height;

    tbb::parallel_for(size_t(0), size_t(optixNbPixels), [&](size_t tbbIdx) {
        const Uint32 pixelIdx = (nbUint32)tbbIdx;

        const Uint32 pixelPosX = (nbUint32)(pixelIdx % width);
        const Uint32 pixelPosY = (nbUint32)(pixelIdx / width);
        const Math::Uvec2 pixelPos = Math::Uvec2(pixelPosX, pixelPosY);

        {
            // In color.
            {
                const RGBFColor color = imageIn->getPixelFromPosition(pixelPos);
                optixSrcColor.setPixelFromPosition(RGBAFColor(color.x, color.y, color.z, 0.0f), pixelPos);
            }

            // Normals.
            {
                const RGBFColor normal = gBuffer->m_normals->getPixelFromPosition(pixelPos);
                optixNormals.setPixelFromPosition(RGBAFColor(normal.x, normal.y, normal.z, 0.0f), pixelPos);
            }

            // Albedo.
            {
                const RGBFColor albedo = gBuffer->m_albedo->getPixelFromPosition(pixelPos);
                optixAlbedo.setPixelFromPosition(RGBAFColor(albedo.x, albedo.y, albedo.z, 0.0f), pixelPos);
            }

            // In flow. They are motion vectors
            {
                const RGBFColor flow = denoisingArgs.gBuffer->m_motionVectors->getPixelFromPosition(pixelPos);
                optixFlow.setPixelFromPosition(RGBAFColor(flow.x, flow.y, flow.z, 0.0f), pixelPos);
            }
        }
    });

    //-----------------------------------------------------------------------------------------------------------------------------------------------------
    // Build the Optix input data
    //-----------------------------------------------------------------------------------------------------------------------------------------------------

    RGBA32FImage optixDestColor(width, height);

    OptiXDenoiser::Data optixDenoisingData;
    optixDenoisingData.width = width;
    optixDenoisingData.height = height;
    optixDenoisingData.color = reinterpret_cast<const float*>(optixSrcColor.getRawData());
    optixDenoisingData.normal = reinterpret_cast<const float*>(optixNormals.getRawData());
    optixDenoisingData.albedo = reinterpret_cast<const float*>(optixAlbedo.getRawData());
    optixDenoisingData.flow = reinterpret_cast<const float*>(optixFlow.getRawData());

    optixDenoisingData.outputs.push_back(reinterpret_cast<float*>(optixDestColor.getMutableRawData()));

    //-----------------------------------------------------------------------------------------------------------------------------------------------------
    // Perform denoising
    //-----------------------------------------------------------------------------------------------------------------------------------------------------
    if (m_firstFrame)
    {
        m_denoiser->init(optixDenoisingData, 0, 0, false, true, false, false, 0, false);
        m_firstFrame = false;
    }
    else
    {
        m_denoiser->update(optixDenoisingData);
    }

    m_denoiser->exec();
    m_denoiser->getResults();

    //-----------------------------------------------------------------------------------------------------------------------------------------------------
    // Read back results
    //-----------------------------------------------------------------------------------------------------------------------------------------------------
    tbb::parallel_for(size_t(0), size_t(optixNbPixels), [&](size_t tbbIdx) {
        const Uint32 pixelIdx = (nbUint32)tbbIdx;

        const Uint32 pixelPosX = (nbUint32)(pixelIdx % width);
        const Uint32 pixelPosY = (nbUint32)(pixelIdx / width);
        const Math::Uvec2 pixelPos = Math::Uvec2(pixelPosX, pixelPosY);

        const RGBAFColor color = optixDestColor.getPixelFromPosition(pixelPos);
        imageRGBFOut->setPixelFromPosition(RGBFColor(color.x, color.y, color.z), pixelPos);
    });
}

Thanks for helping!

4

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật