|
I want to doing the operation z-zfront,zfront's values are in the depth buffer.Now I want to store these values into a HILO texture,how to do this?
I have checked the OpenGL extension specifications about the NV_texture_shader,we can build a HILO texture:
- GLushort HILOtexture[] = {0, 0};
- glGenTextures(1, &this->hilotextureid);
- glBindTexture(GL_TEXTURE_2D, this->hilotextureid);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_HILO_NV, 1, 1, 0, GL_HILO_NV,
- GL_UNSIGNED_SHORT, &HILOtexture);
复制代码
these codes are from the open source,but I can't understand these,why the size of the HILO texture is 1*1? How to use it to store the depth values?should I bulid a depth texture?how to relate them?
|
|