   DirectX 10 UNORM vs. SNORM
  Hi all,I am wondering if there is a way of avoiding the scale and bias required for normal maps in DX10 (the "-1.0 + 2.0 * fetchedNormal" thing).In the PS3, for example, you can use tex_bx2 for doing that.I was wondering if using SNORM (I assume normalized signed value, in range -1.0 .. 1.0) would do the trick. I tried it but it seems to do nothing.Can somebody give me a clue about what's the usage of SNORM DXGI_FORMATs? And a way for avoiding the scale and bias required in normal maps?Thx in advance![Edited by - IrYoKu1 on August 7, 2010 10:25:24 AM]
  snorm format is for signed values.  The scale/biasing amount depends the number of bits per channel in the format.  A float32 snorm would provide the best precision.  You can store the value directly within the range [-1.0,1.0]. Larger things should get clamped.  So mostly that confirms what you already knew.   ;  I am using DXGI_FORMAT_BC5_SNORM (3Dc), but it really don't matter if I use either DXGI_FORMAT_BC5_SNORM or DXGI_FORMAT_BC5_UNORM, I get the same values from the texture. What can I be doing wrong?Thx!   ;  I discovered what is the problem: I'm just changing the Format member of the D3DX10_IMAGE_LOAD_INFO structure to DXGI_FORMAT_BC5_SNORM. As the original files is encoded using DXGI_FORMAT_BC5_UNORM, DX is just converting the texture to that format (thus mapping the 0..1 range of the original UNORM texture to the 0..1 range of the SNORM texture). I'm using the nVIDIA dds plugin for creating the 3Dc compressed normal map, there is a way of encoding it directly as SNORM?   ;  I tried creating a 32bit DDS file which contains the normals in range -1..1. Then I used D3DX10_IMAGE_LOAD_INFO to convert to DXGI_FORMAT_R8G8_SNORM in run-time: it worked perfectly.But then, when I tried to do the same thing converting to DXGI_FORMAT_BC5_SNORM, it gave me wrong normal values. Maybe it is a bug of DX? It seems to me that DXGI_FORMAT_BC5_SNORM is not working properly.   