游戏开发论坛

 找回密码
 立即注册
搜索
查看: 1984|回复: 1

how to store the depth buffer's value into the HILO texture?

[复制链接]

3

主题

5

帖子

11

积分

新手上路

Rank: 1

积分
11
发表于 2007-11-14 17:05:00 | 显示全部楼层 |阅读模式
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:

  1. GLushort HILOtexture[] = {0, 0};
  2. glGenTextures(1, &this->hilotextureid);
  3. glBindTexture(GL_TEXTURE_2D, this->hilotextureid);  
  4. glTexImage2D(GL_TEXTURE_2D, 0, GL_HILO_NV, 1, 1, 0, GL_HILO_NV,
  5.                    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?

36

主题

1047

帖子

1147

积分

金牌会员

Rank: 6Rank: 6

积分
1147
发表于 2007-11-16 00:54:00 | 显示全部楼层

Re:how to store the depth buffer's value into the HILO texture?

如果你是中国人,请用中文。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2025-6-18 03:33

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表