-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Labels
Description
Direct3D12 blit texture to a cubemap face and mip produces black.
using bgfx::blit to fill a cuemap's face and mip does't really work properly. It works great on all other backends
dx11,opengl,vulkan. I suspect this to be a problem in the dx12 renderer implementation but i am not an expert and couldn't find anything obvious.
Here is an example code:
//bgfx::TextureInfo of the output cubemap
const auto& ti = params.output_cube->info;
for(uint8_t face = 0; face < 6; ++face)
{
// input_faces is just an array of Frame Buffers for each face already filled and has mips.
auto src = params.input_faces[face]->native_handle();
for(uint8_t mip = 0; mip < max_mips; ++mip)
{
uint16_t dim = ti.width >> mip;
bgfx::blit(pass.id, output_cube->native_handle(), mip, 0, 0, face, src, mip, 0, 0, 0, dim, dim, 1);
}
}
Mip 1 and beyond is just black.
And here is the output on DX11/Vulkan/OpenGL
Mip 0
Mip 1 and beyond
