Skip to content

Commit

Permalink
BC4 texture import: reswizzle to rrr1
Browse files Browse the repository at this point in the history
  • Loading branch information
turanszkij committed Feb 22, 2025
1 parent 65081ab commit bc3cf30
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion WickedEngine/wiResourceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,14 @@ namespace wi
break;
}

if (desc.format == Format::BC5_UNORM)
if (desc.format == Format::BC4_UNORM || desc.format == Format::BC4_SNORM)
{
desc.swizzle.r = ComponentSwizzle::R;
desc.swizzle.g = ComponentSwizzle::R;
desc.swizzle.b = ComponentSwizzle::R;
desc.swizzle.a = ComponentSwizzle::ONE;
}
if (desc.format == Format::BC5_UNORM || desc.format == Format::BC5_SNORM)
{
desc.swizzle.r = ComponentSwizzle::R;
desc.swizzle.g = ComponentSwizzle::G;
Expand Down

0 comments on commit bc3cf30

Please sign in to comment.