PDA

View Full Version : GL_RGBD



Racoon
10-25-2005, 06:41 AM
How to make the texture with internal format RGBD?
In order to execute similary code:

glTexImage2D (GL_TEXTURE_2D, 0, GL_RGBA_FLOAT16_ATI, SZ_TEX, SZ_TEX, 0, GL_RGBA, GL_FLOAT, 0);

glCopyTexImage2D (GL_TEXTURE_2D, 0, GL_RGB16, ...);
glCopyTexImage2D (GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT16, ...);

This is don't work.

Korval
10-25-2005, 08:04 AM
There's no such thing as a single texture with color and depth information. They need to be two separate textures (perhaps of the same size).

Racoon
10-25-2005, 09:07 AM
Thanks, interestingly on D3D it is possible?

jide
10-25-2005, 09:09 AM
Is it a question ? If so, it's not a DX forum :)

PkK
10-25-2005, 09:27 AM
You could just use a RGBA16 texture and a simple fragment shader that writes the Alpha value do depth and replaces the alpha value with 1.

Philipp

Racoon
10-25-2005, 11:39 AM
I'am had jump over these (similar) procedures.
In general it is clear. Thanks.

SirKnight
10-25-2005, 01:47 PM
Originally posted by Racoon:
Thanks, interestingly on D3D it is possible?Maybe in a IDirect3DSurface9, but not with a IDirect3DTexture9.

A surface in D3D is kind of (just a little) like a FBO (Frame Buffer Object) in GL. It can contain color info, depth, etc. So maybe you would be interested in using FBOs. :) Although an FBO can contain multiple color attachments whereas a d3d surface can't (as far as I know).

Racoon
10-25-2005, 09:01 PM
Ok, but the FBO is like are primary buffers in this sense.

Zulfiqar Malik
10-25-2005, 11:56 PM
[OFF-TOPIC] D3D does not support 16-bit floating point color and depth values in the same surface and/or texture. Even if some third party software does it, it'll be doing it in software.

V-man
10-26-2005, 05:13 AM
Originally posted by Racoon:
Ok, but the FBO is like are primary buffers in this sense.Yes, you render to them. Use them for render to texture (RTT). They are simple enough to use.

To everyone else, I'm sure D3D is wonderdul, but how is this relevant?

Zulfiqar Malik
10-26-2005, 05:27 AM
It was a bit relevant in this particular case (particularly since the author seems to have used D3D) and it can be quite relevant some other times too, and if need be, i don't see any crime in making comparisons between OpenGL and D3D on this particular forum (or elsewhere).
Sometimes features in OpenGL specifications (especially recently) are "inspired" from D3D and explicit references are given in some specs (and/or research papers by nVidia and ATI).
Nobody is discussing D3D over here, its just some feature set comparison, and its always good to know your "enemy".

<speculation> oh god, here comes a flame war ;) </speculation>