Jump to content
  • Advertisement
Sign in to follow this  
Darkn1o

Higher precision depth textures on ATI

This topic is 4491 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

I'm developing an application on an X1900 that requires higher precision depth textures. I know that this card supports 24-bit depth textures, however the precision in the depth texture thats created always seems to be limited to 16 bits. Even when glGetTexLevelParameter claims that the depth texture is 32 bits, my precision only seems to be at around 16. My initialization code is below. I am also using Catalyst drivers 6.2. On a 6800GT, I've tested this code and it works as expected, so I'm not sure if theres something wrong with the code or with the card.
	glGenTextures(1,&depth);
	glBindTexture(GL_TEXTURE_2D,depth);
	glTexImage2D(GL_TEXTURE_2D,0,GL_DEPTH_COMPONENT24_ARB,TEXSIZE,TEXSIZE,0,GL_DEPTH_COMPONENT,GL_FLOAT,0);
	
	glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
	glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
	glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
	glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
	glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE_ARB, GL_COMPARE_R_TO_TEXTURE_ARB);
	glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_FUNC_ARB, GL_NONE);
	glGetTexLevelParameteriv(GL_TEXTURE_2D,0, GL_TEXTURE_DEPTH_SIZE_ARB, &test);

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!