Jump to content
  • Advertisement
Sign in to follow this  
ZaiPpA

Rendering to 3D textures?

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

Hi! I've read that on the GeForce 8800 it is possible to render to a 3D texture using an FBO. (i don't have an 8800 so i can't test it) I'm a bit confused about what this means exactly. Is it:
  • the fragment shader can render to any slice of the 3D texture during a single pass (i.e. 3D instead of 2D) (The entire 3D texture is attached to the FBO and maybe the shader selects which one to render to)
  • the fragment shader can only render to one 2D slice per pass (i.e. still just 2D, like for 2D textures) (Only one slice of the 3D texture is attached to the FBO)
? I haven't really been able to find any info on it, except for other people asking this question :) It would be really cool if it was now possible to truely render to a 3D texture, instead of just rendering to a slice

Share this post


Link to post
Share on other sites
Advertisement
I've skimmed the extension in the past some time, from memory I think you only bind a single layer (i.e. one Z value) of the 3d texture at a time, so the fragment shader still acts as usual (outputting to a 2D buffer).

Share this post


Link to post
Share on other sites
I think you can render to any slice of a 3D texture by using geometry shaders to select the slice while having the 3D texture bound using glFramebufferTextureEXT (GL_EXT_geometry_shader4)

Quote:
From the specs
Section 2.16.4, Geometry Shader Execution Environment

...

Layered rendering

Geometry shaders can be used to render to one of several different layers of cube map textures, three-dimensional textures, plus one- dimensional and two-dimensional texture arrays. This functionality allows an application to bind an entire "complex" texture to a framebuffer object, and render primitives to arbitrary layers computed at run time. For example, this mechanism can be used to project and render a scene onto all six faces of a cubemap texture in one pass. The layer to render to is specified by writing to the built-in output variable gl_layer. Layered rendering requires the use of framebuffer objects.


I don't have an 8x00 so i haven't tried it.

HellRaiZer

Share this post


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

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!