Skip to main content

Floating point framebuffer

Submitted by Gaffer on

Hey, i've been thinking about bootlegging these fancy new DirectX 9.0 cards to do some cool oldskool software rendering in a float buffer, and i've designed a next generation concept for my TinyPTC library to work with floating point r,g,b,a pixels.

I've got a brief outline up at http://www.gaffer.org/tinyptc, more specifically the design is sketched out at http://www.gaffer.org/tinyptc/tinyptc.hpp

What do you guys think? floating point color, future of software rendering or insane crazy stuff :)

Submitted by davidcoen on Sun, 01/06/03 - 12:14 PMPermalink

(punches maitrek in the nuts) it can be useful knowing how to program, and it can be useful to do things that other people may have already done themselves, as you might be able to use it for things that other versions simply wont allow.

i occasionally use a float frame buffer, and i used it in a application i wrote and use almost everyday, and i look at comercial software that does the same thing horribly (the max5 bake texture is trully horrible) Yes, someone else already did it, but they did it like _SH_T_

i used a float frame buffer to hold rgba and a 32 bit amask, also had a temp float to hold another coverage related number to save recalculating...

Submitted by redwyre on Sun, 01/06/03 - 8:45 PMPermalink

I can't wait to do some HDR stuff! The posibillities are endless! yay for floats!

Although it is no longer "next generation", but the current generation :) (IMO at least)

Gaffer: you use exit() to end the program?! Bad coder! *slaps wrist*

Submitted by Gaffer on Sun, 01/06/03 - 10:11 PMPermalink

bah, its just an example, normally i'd set a flag and stop the loop or something :)

Submitted by redwyre on Sun, 01/06/03 - 11:59 PMPermalink

That's no excuse!

"future of software rendering" - did you mean hardware?

Submitted by Gaffer on Mon, 02/06/03 - 4:55 AMPermalink

i meant software rendering, ie. for raytracers, demos etc. doing software rendering to a framebuffer - but its a float framebuffer, made possible and practical by nice stuff like dx9 cards and SSE2 - floating point hardware rendering is nothing new, i'm just proposing to use that hardware for something different, for hobbyist purposes

btw, i do a lot of software AND hardware rendering these days, i'm by no means arguing that anybody SHOULD do their rendering with software instead of hardware, but if they want to code framebuffer stuff, why not benefit from the coolness of floating point pixel formats - it would be nice for high end renderers, raytracers etc, or for realtime software rendered demoscene type stuff etc etc... :)

Submitted by Gaffer on Mon, 02/06/03 - 4:59 AMPermalink

not to mention how cool the floating point accuracy is for feedback filter effects etc... ! :) its really fun doing image processing with floating point formats compared to the pain for integer 32bit color (clamping, accuracy, splitting color components processing and recombining etc.)

Submitted by Maitrek on Tue, 03/06/03 - 9:39 PMPermalink

I don't know where you are coming from davidcoen.... :P
I was just referring to the fact that I've attempted to make ppl think/talk about floating point colour and, as an aside - floating point buffers, before. However to no avail!
At least this time people are responding to gaffer's post

Posted by Gaffer on

Hey, i've been thinking about bootlegging these fancy new DirectX 9.0 cards to do some cool oldskool software rendering in a float buffer, and i've designed a next generation concept for my TinyPTC library to work with floating point r,g,b,a pixels.

I've got a brief outline up at http://www.gaffer.org/tinyptc, more specifically the design is sketched out at http://www.gaffer.org/tinyptc/tinyptc.hpp

What do you guys think? floating point color, future of software rendering or insane crazy stuff :)


Submitted by davidcoen on Sun, 01/06/03 - 12:14 PMPermalink

(punches maitrek in the nuts) it can be useful knowing how to program, and it can be useful to do things that other people may have already done themselves, as you might be able to use it for things that other versions simply wont allow.

i occasionally use a float frame buffer, and i used it in a application i wrote and use almost everyday, and i look at comercial software that does the same thing horribly (the max5 bake texture is trully horrible) Yes, someone else already did it, but they did it like _SH_T_

i used a float frame buffer to hold rgba and a 32 bit amask, also had a temp float to hold another coverage related number to save recalculating...

Submitted by redwyre on Sun, 01/06/03 - 8:45 PMPermalink

I can't wait to do some HDR stuff! The posibillities are endless! yay for floats!

Although it is no longer "next generation", but the current generation :) (IMO at least)

Gaffer: you use exit() to end the program?! Bad coder! *slaps wrist*

Submitted by Gaffer on Sun, 01/06/03 - 10:11 PMPermalink

bah, its just an example, normally i'd set a flag and stop the loop or something :)

Submitted by redwyre on Sun, 01/06/03 - 11:59 PMPermalink

That's no excuse!

"future of software rendering" - did you mean hardware?

Submitted by Gaffer on Mon, 02/06/03 - 4:55 AMPermalink

i meant software rendering, ie. for raytracers, demos etc. doing software rendering to a framebuffer - but its a float framebuffer, made possible and practical by nice stuff like dx9 cards and SSE2 - floating point hardware rendering is nothing new, i'm just proposing to use that hardware for something different, for hobbyist purposes

btw, i do a lot of software AND hardware rendering these days, i'm by no means arguing that anybody SHOULD do their rendering with software instead of hardware, but if they want to code framebuffer stuff, why not benefit from the coolness of floating point pixel formats - it would be nice for high end renderers, raytracers etc, or for realtime software rendered demoscene type stuff etc etc... :)

Submitted by Gaffer on Mon, 02/06/03 - 4:59 AMPermalink

not to mention how cool the floating point accuracy is for feedback filter effects etc... ! :) its really fun doing image processing with floating point formats compared to the pain for integer 32bit color (clamping, accuracy, splitting color components processing and recombining etc.)

Submitted by Maitrek on Tue, 03/06/03 - 9:39 PMPermalink

I don't know where you are coming from davidcoen.... :P
I was just referring to the fact that I've attempted to make ppl think/talk about floating point colour and, as an aside - floating point buffers, before. However to no avail!
At least this time people are responding to gaffer's post