Native R32F and G32R32F support in OpenGL

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Native R32F and G32R32F support in OpenGL

Post by Nadro »

Hi, This is patch for native support R32F and G32R32F in OpenGL:
http://nadro.net46.net/Patches/irrlicht ... _ogl.patch
In first version OpenGL FP RTTs has got always GL_RGBA32F_ARB or GL_RGBA16F_ARB, so performance drop if You need only R32F or G32R32F channels...
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
sio2
Competition winner
Posts: 1003
Joined: Thu Sep 21, 2006 5:33 pm
Location: UK

Post by sio2 »

Excellent.

Couple of questions:
1. Is there FP texture support for DX9?
2. It would be nice to be able to query the driver as to what filtering is supported FP textures.
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Post by Nadro »

sio2 wrote:Excellent.

Couple of questions:
1. Is there FP texture support for DX9?
2. It would be nice to be able to query the driver as to what filtering is supported FP textures.
1. Yes :) It's avaiable in Irrlicht rev 2398.
2. This is very good idea, it will be very usefull for switching between hardware filtering and emulate filtering in shader.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Ah thanks Nadro nearly missed this. Will look into it soon.
2. It would be nice to be able to query the driver as to what filtering is supported FP textures.
Yes filtering, and blending support is now a concern that we have floating point render targets. We're going to need some robust way of handling these capabilities.
In first version OpenGL FP RTTs has got always GL_RGBA32F_ARB or GL_RGBA16F_ARB, so performance drop if You need only R32F or G32R32F channels...
Actually they are using GL_RGB32F_ARB and GL_RGB16F_ARB, but still bad...

EDIT:

A closer looks seems that you are not using the ARB versions anymore. Will this cause any compatibility problems?
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Post by Nadro »

I tested it on Radeon 4850 and Radeon 9550, with the latest version of catalyst and all works properly on both cards.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

Patch applied.

NOTE: Irrlicht currently checks that "GL_ARB_texture_float" is defined before using floating point texture types. It works fine on my machine but I'm curious if people using OGL extensions only will have problems with this, should I check for ARB vs OGL 2.0 support and pick between the two types?
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yes, unfortunately, we need to check for all possible extensions and use the proper define for each of them. There is usually no problem with default OGL usage, because we have our own glext.h and thus all symbols are dfined. But once someone uses a specific glext version (or none at all, e.g. by compiling without extension pointers) there are not all symbols defined anymore. I do check such things on Solaris machines usually, where I have a very restricted OpenGL version installed. But using old drivers without extension pointers will do the same job usually.
Post Reply