Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oidnNewSharedBuffer pixel ordering #236

Open
SimonGido opened this issue Aug 29, 2024 · 1 comment
Open

oidnNewSharedBuffer pixel ordering #236

SimonGido opened this issue Aug 29, 2024 · 1 comment

Comments

@SimonGido
Copy link

Hello, I have a problem understanding, what is the ordering of pixels in OIDNBuffer compared to Directx11. I create a texture and fill it with pixels, then I create oidn buffer from shared handle. Texture is rendered correctly but after reading data from oidn buffer and storing it as bmp file it has clearly different pixel ordering.
The first picture is input texture
The second picture is output texture after denoising first texture
The third picture is texture I create from data I read from OIDNBuffer.

Untitled

@atafra
Copy link
Collaborator

atafra commented Oct 29, 2024

The ordering of pixels in OIDNBuffer is well-defined, please see the documentation for details. The question is what is the layout of the texture you're using but it looks like it's a swizzled layout, which is undefined. You can pass only textures in row-major layout (D3D11_TEXTURE_LAYOUT_ROW_MAJOR) to OIDN, which is not the optimal/default layout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants