Higher precision depth textures on ATI

Started by
-1 comments, last by Darkn1o 18 years, 1 month ago
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);

This topic is closed to new replies.

Advertisement