Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

ababkin

about 16bit per channel textures

This topic is 5721 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi I am in desperate need to use the 16bit per color channel textures capability of DX9. The reason: Normalmaps. As anyone who tried using 8bit per channel textures for normalmaps knows that it is crap. I have tried generating two textures to encode normal''s 16bit X,Y in first and Z in the second texture, but i would rather use a single texture for all components (ie x,y,z) plus it''ll give me ability to use proper A16R16G16B16 format in DX9 which means - proper filtering (as opposed to generic POINT). If anyone has links to resourses on 64bit textures, i''d appreciate posting them for me. I use *modified* ATI''s normalmapper_2_2 utility to generate my normalmaps. So i have to use tga format. Thanks Alex Babkin Alias|Wavefront Research Department

Share this post


Link to post
Share on other sites
Advertisement
You can encode the first two components as 16bit and calculate the third in your pixel shader. There is an ATI demo of this (ATI website, hi-res normal maps).

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You cannot get filtering with any format that gives you more than 8 bits per pixel, sorry.

You might want to use DU/DV textures with 16 bits per component, and derive the third component.

Also, 8 bits per pixel is enough for normal maps, if you use sufficient resolution, and you create normalized MIP maps, and you normalize the post-filtered read you get out of the texture.

Share this post


Link to post
Share on other sites
well i use NRM instruction (normalize) in DX9 for 8bit normalmaps, good resolution, and still it doesnt even get close to 16bit quality.
I tried to use my own .raw format to output the normalmap with 16bit per channel.
I want to make use of the D3DFMT_A16B16G16R16 format.
So for a test i am creating a texture of this format in my application and trying to access the texture data through LockRect (standard way). Except for, for some reason, the Pitch (stride) is 1024bytes for this texture that measures 256x256pixels (and not at least 2048 as it should be in my opinion for 16bit per channel)
So, theoreticaly, if i divide 1024bytes (pitch) by 256pixels (a line of the bitmap) and then by 4 (4 channels) = 1 (1 byte per channel, when it supposed to be 2 bytes per channel)

Please, can anyone shed some light on that?

Thank you

Alex Babkin
Alias|Wavefront
Research Department

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!