Our Softwares > Demoniak3D (english forum)

Hyperion v1.1.0: the revenge of FBOs

(1/1)

JeGX:
Hyperion 1.1.0 download

This new version of Hyperion brings us the GPGPU programming support. See the official web site ( http://www.gpgpu.org )
for further information.

But in a word, GPGPU prog allows to use the GPU in all-purposes calulus like simulations of complex physics phenomenons
(fluids mechanics for instance). But one of the biggest difficulties is to transpose CPU algorithms in GPU algorithms.

GPGPU programming shows us the way to follow from four concepts:

- GPGPU concept 1: Arrays = textures
- GPGPU concept 2: Kernels = shaders
- GPGPU concept 3: Computing = drawing
- GPGPU concept 4: Feedback

These four concepts are now supported by Hyperion. Concepts 2 and 3 are already supported from the first versions. The new thing is about concepts 1 and 4. Concept 1 requires floating point textures in order to store non-clamped real numbers (i.e. not limited to [0.0 ; 1.0] interval).
These numbers respect the IEEE 754 32-bits standard. Hyperion has a new pixel format to support these textures: RGBA_32F.

Floating point textures can be acceded only through vertex and pixel shaders. Hyperion now offers a better FBO support. FBOs or Framebuffer Objects are the modern solution to concept 4: feedback. The feedback allows to use the previously calculated values (output) as new input for the shader. The pixel shader ,that is reponsible of calculations, stores the new result in the texture. The only way to write into a RGBA_32F texture is to do a RTT or Render To Texture. But a regular RTT uses the application 3D window framebuffer. This framebuffer clamps the values in the interval [0.0 ; 1.0] which is a big problem in our case. FBOs allow to create new framebuffers without this limitation. We can write full floating point values to textures that are attached to these FBOs. The Hyperion LUA host-API has a new set of instructions to deal with FBOs ( HYP_Scene.fbo_xxxx() ).

But as always in the world of realtime 3D, things are not simple. nVidia and ATI both support floating point textures but each in his own way.

nVidia supports floating point textures only with NPOTD (Non Power Of Two Dimension) textures through the GL_NV_texture_rectangle extension with all little inconveniences like non-normalized uv texture coordinates. On a nVidia hardware, Hyperion creates automatically a NPOTD texture if the pixel format is EGBA_32F and if the texture is attached to a FBO. We can also specify a NPOTD texture using the TEXTURE_RECTANGLE_2D enum with the type attribute of the texture node.

ATI does not support the GL_NV_texture_rectangle extension but vaguely supports the GL_EXT_texture_rectangle extension. But I didn't investigate
seriously on that topic (surely the strain) since ATI supports floating point textures with regular 2D textures (POTD) but offers a resolution of 24-bits
only...

Last thing, at the shaders level, we can access to NPOTD textures with the new samplerRect sampler but it is supported by nVidia only.

To sum up, use nVidia hardware for GPGPU programming... at least at the moment. But if one day, I receive a graphics card from... 3DLabs for instance, maybe I will change my last sentence...

To touch all these stuffs with your hands, see the  tutorial about Mandelbrot Set rendering using GPGPU techniques and especially the demo that shows Mandelbrot fractal rendering in action.

Here are the main changes of this new version of Hyperion.

3D coding is much, much time, a lot of sweat, a lot of blood, a lot of yells, an everlasting fight against the machine but fortunately a little satisfaction when pixels fall into place in the screen. If anyone's interested...

Groove:
GL_EXT_texture_rectangle is the same extension than GL_NV_texture_rectangle and GL_ARB_texture_rectangle. In fact this extension doesn't exist but because of nVidia and ATI friendly behavious there is GL_EXT_texture_rectangle.

GL_ARB_texture_rectangle is the promoted version of GL_NV_texture_rectangle but ATI has voted NO during this poll so they keep the name GL_EXT_texture_rectangle. Pathetic but true Oo

I don't know why you have some problem with texture 2D on nVidia card and FBO but I have found some issue as well. However, I haven't tried FBO with GLSL witch propably matter.

Great release !

Navigation

[0] Message Index

Go to full version