d3d9: Do software conversion to take advantage of B5G6R5.
d3d11: Do software conversion to take advantage of B5G6R5.
gl: Set internal representation to swap R and B.
metal: Swizzle R and B and remove software conversion.
* texture format info: Invert R and B in RGBA4
d3d9: Revert 06c08adc9e to force software
conversion because the format doesn't exist
d3d11: Force software conversion because the format doesn't exist
gl: Revert 3e3e655262 to swizzle R and B
mtl: Swizzle channels
* metal: Remove explicit conversion of RGBA4 and RGB5A1 in osx
* metal: Set alpha bit to correct end of short
d3d9: Revert 76db2ed38d to force software
conversion and use the format that does exist
d3d11: Force software conversion because the format doesn't exist
gl: Revert b36aa71403 to swizzle R and B
mtl: Swizzle R and B
* examples: Add imageformats example
Example which renders RGBA color wheel, alpha gradient and full value channel textures to
catch conversion errors and bad internal type representations between different backend
renderers.
The example uses bimg to convert from a master texture to different textures.
Each texture is rendered in an ImGui list using `ImGui::Image`. A close-up is visible
when hovering over each image.
U and I textures are skipped because they don't work for sampling.
Compressed textures are skipped because they don't have conversion functions.
Depth textures are not rendered because they don't work with channels.
* pixelformats: Present texture format in table
* Update pixelformats.cpp
* Update pixelformats.cpp
* pixelformats: Update screenshot
* pixelformats: Add checkerboard background
Co-authored-by: Michał Cichoń <michcic@gmail.com>
Co-authored-by: Бранимир Караџић <branimirkaradzic@gmail.com>
dear-imgui updated the stb_rect_pack which bgfx should match.
Users with the old stb_rect_pack will get an assertion failure with font atlases not being packed properly with latest bgfx.
I noticed that this 0363560934
broke b5e7a4cccd/examples/16-shadowmaps/shadowmaps.cpp (L1750)
which shouldn't be the case. The validation was meant for only multisample flags.
my boolean logic assumes that it must be BGFX_TEXTURE_RT in the flag or BGFX_TEXTURE_RT_MSAA_XX in the flag.
* D3D12: Fix ResolveSubresource texture format parameter
For depth textures this always returned the TYPELESS one, but instead it should have passed the FLOAT.
* D3D11: Fix ResolveSubresource texture format parameter
For depth textures this always returned the TYPELESS one, but instead it should have passed the FLOAT.