Non HDR FP16 blending effects

pat777

Newcomer
How can/Can FP16 blending increase IQ/performance with non-HDR effects such as motion blur and depth of field?
 
pat777 said:
How can/Can FP16 blending increase IQ/performance with non-HDR effects such as motion blur and depth of field?

Well there is more precision than in INT8. 3dfx done both effects in 32bpp, so if you do FP16 it should give better precision which may lead to better IQ.

FP16 provides better performance because of lower storage requirements than FP32.

Just to let people know, I am trying to be funny.
 
pat777 said:
How can/Can FP16 blending increase IQ/performance with non-HDR effects such as motion blur and depth of field?
Well, basically, if the data is stored after each blend of the framebuffer at 8-bit, the same as the final output, you'll get creeping errors. That is, you won't be certain that the last of those 8 bits is correct each time, and so you may get the classical signatures of too little precision: dithering and banding (as usual, this will be most noticeable in a situation with either lots of blends, or smooth gradients, or both).

FP16 can help out here because it has a few extra bits of precision, and won't overflow in a simple blending scenario.
 
pat777 said:
How can/Can FP16 blending increase IQ/performance with non-HDR effects such as motion blur and depth of field?

If you want some kind of blending without fp16 blending support, you have to write a pixel shader which does the sampling for you. With fp16 blending in hw, you can at least save this shader pass....

Thomas
 
Would be nice if accumulation buffers worked well on most video cards then you don't need pixel shaders to do motion blur and depth of field effects. So you can do the effects without pixel shaders just all the times I've messed with the accumulation buffer (not recently though) its been software accumulation buffers instead of hardware (nice big speed loss of course as a result).
 
A question about accumulation buffers. . .

I know that they've been supported in hardware on ATI cards since the R300 (and presumably the RV350). What about NVidia, though?
 
Ostsol said:
A question about accumulation buffers. . .

I know that they've been supported in hardware on ATI cards since the R300 (and presumably the RV350). What about NVidia, though?

Are you sure? I think the Radeon 256 had some kind of accumulation buffer for certain effects, but thr r2xx / r3xx / r4xx don't.

Thomas
 
tb said:
Ostsol said:
A question about accumulation buffers. . .

I know that they've been supported in hardware on ATI cards since the R300 (and presumably the RV350). What about NVidia, though?

Are you sure? I think the Radeon 256 had some kind of accumulation buffer for certain effects, but thr r2xx / r3xx / r4xx don't.
Are you sure? ;)
 
nope, just checked, and the ATi page says: "...approximate accumulation buffer..." - so no real acc. buffer.

Any OpenGL acc. buffer demo to test it on current hw?

Thomas
 
tb said:
nope, just checked, and the ATi page says: "...approximate accumulation buffer..." - so no real acc. buffer.
What is a "real" accumulation buffer? I am pretty certain the multisample buffer can be used for accumulation since the samples are maskable. I asked someone in the OpenGL team and they said the R300 and up support accumulation buffers.
Any OpenGL acc. buffer demo to test it on current hw?
No idea.
 
Heh one second and I will see about whipping up a simple motion blur accumulation buffer demo. I'm bored of this stuff I'm currently working on :p (damn yeast colony morphology model issues) Either that or see if can find a quick demo.

Edit: Heres some accumulation buffer demos, going to try compiling them and see how they work on this 9800 Pro. http://www.sgi.com/software/opengl/advanced96/programs.html
 
Quick compile of the soft shadow demo results in umm nice hard shadows.

Edit: Motion blur demo on the otherhand works else than its a boring demo
 
Ostsol said:
A question about accumulation buffers. . .

I know that they've been supported in hardware on ATI cards since the R300 (and presumably the RV350). What about NVidia, though?
nVidia's had it since the TNT. The problem is performance. With an accumulation buffer, you're doing the combining in external memory. You can do a lot less work, as well as save on lots of memory bandwidth, if the techniques are done within the pixel shader.
 
Chalnoth said:
Ostsol said:
A question about accumulation buffers. . .

I know that they've been supported in hardware on ATI cards since the R300 (and presumably the RV350). What about NVidia, though?
nVidia's had it since the TNT. The problem is performance. With an accumulation buffer, you're doing the combining in external memory. You can do a lot less work, as well as save on lots of memory bandwidth, if the techniques are done within the pixel shader.
If it's done in external memory, is it really hardware accelerated accumulation buffer support? I know that various drivers for various video cards have had it in software for quite a while. . . AFAIK, starting with the R300 ATI accumulation buffer blending and storage is all on-card.
 
Well here's quick demo of motion blur using accumulation buffer. Its based off the SGI motion blur kinda but rewrote the stuff handling its motion blur though. Might modify one of Humus's demos real quick for something a little more intensive than this piece (I hope you won't mind Humus if I end doing that).

http://www.geocities.com/cryect/index.html

Edit: FPS without motion blur maximized at 1600x1200 are ~380 FPS and with motion blur ~80 FPS. This is using a Radeon 9800 Pro 128MB with dual Xeon 3.066ghz (which is kinda worthless for a non-multithread application of course).

Edit 2: All those other compiled accumulation buffer demos http://www-courses.cs.uiuc.edu/~cs319/accum/accum.html
 
Alright just added quick demo of motion blur using Humus's soft shadow demo. Get it at same website above.

w/o Accumulation Motion Blur ~60 FPS
w/ Accumulation Motion Blur ~41 FPS

Using full screen at 1600x1200

(Tried doing it with flag demo but the framerate really crashed on that one).
 
Thanks! 101 fps at fullscreen on my Radeon 9700 Pro at 1024x768 (can't run any higher and get a refresh rate over 60 Hz). 153 fps without the motion blur.

I guess the change you made to OpenGLApp.cpp was just adding the accumulation buffer to the pixel format?

It's cool how motion blur requires so little extra code. . . :)

Code:
	float Worth=exp(-8.0f*frameTime);
	glAccum(GL_MULT,Worth);
	glAccum(GL_ACCUM, 1.0f-Worth);
	glAccum(GL_RETURN, 1.f);
 
Yeah, was going to say exact lines of code added before but had to run off since friend was waiting on me to go out for some drinks.

Basically just had to specify 32 bits of accumulation buffer, then 8 bits for each field.

Edit: Also can confirm now that the R200 is definately Software Accumulation Buffer or at least a horrible hardware implementation otherwise. (using the SGI based demo ~60 fps without and ~3 FPS with)

Definately a feature you would only want of course if FPS are higher than VSync with it.

R200's accumulation buffer also doesn't seem to work correctly at all with any of those SGI demos (in my modified version works fine though except for the framerate).
 
Ostsol said:
If it's done in external memory, is it really hardware accelerated accumulation buffer support? I know that various drivers for various video cards have had it in software for quite a while. . . AFAIK, starting with the R300 ATI accumulation buffer blending and storage is all on-card.
Considering you have to do it at the frame level, it's not really feasible to do it in on-chip memory with most architectures.
 
Chalnoth said:
Ostsol said:
If it's done in external memory, is it really hardware accelerated accumulation buffer support? I know that various drivers for various video cards have had it in software for quite a while. . . AFAIK, starting with the R300 ATI accumulation buffer blending and storage is all on-card.
Considering you have to do it at the frame level, it's not really feasible to do it in local memory with most architectures.

Hmmm in a TBDR on the otherhand you can handle it for each tile ;) (edit: in Local Memory I mean assuming I understand what you are getting at that is)
 
Back
Top