【发布时间】:2020-09-21 07:57:10
【问题描述】:
directX 中有多种纹理格式: https://docs.microsoft.com/en-us/windows/win32/api/dxgiformat/ne-dxgiformat-dxgi_format
大多数都很清楚,但什么是“无类型”纹理?例如,对于 BC6H,有
DXGI_FORMAT_BC6H_TYPELESS,
DXGI_FORMAT_BC6H_UF16,
DXGI_FORMAT_BC6H_SF16,
UF16 是无符号浮点数,SF16 是有符号浮点数,至少编码器https://docs.microsoft.com/en-us/windows/win32/direct3d11/bc6h-format(也可能是解码器?)似乎关心格式是有符号还是无符号。
但是“无类型”是什么意思?这样的纹理是如何编码和解码的?
【问题讨论】:
-
参见“格式修饰符”“_TYPELESS”docs.microsoft.com/en-us/windows/win32/api/dxgiformat/…
-
文档声明
When a typeless resource is bound to a shader, the application or shader must resolve the format type着色器如何解析格式类型? -
例如,当您从无类型纹理创建着色器资源视图时,可以指定具有不同类型格式的区域:docs.microsoft.com/en-us/windows/win32/api/d3d11/…
标签: compression gpu directx textures directx-11