PDA

View Full Version : Weird Artifacts with 32-bit float_buffer multi-pass rendering...



sek
12-01-2003, 04:55 PM
I have tried to change my 8-bit pbuffers to 32-bit float_buffers. In some sense my code works, but some weird things are happening. Here is a link to four images using 32-bit float_buffers. Each image has been run for more passes (i.e. 50 to 2000). See the small artifacts that grow into larger ones culminating in a blackout. I am using fragment programs on FX 5900 Ultra. The last/fifth image is what it should look like using 8-bit pbuffers - no artifacts:
http://www.enel.ucalgary.ca/~krakiwsk/

What is even weirder is that each time I run the program the artifacts grow in different places and at different rates. I have been doing the same thing for a while with 8-bit pbuffers with no such problems. I have made all the changes that I think need such as normalized texture coordinates to non-normalized, GL_TEXTURE_2D to GL_TEXTURE_RECTANGLE_NV, and 2D to RECT in the fragment program.

Can anyone help?

dorbie
12-02-2003, 12:03 PM
Hmm... looks like some contamination creeping in... I wonder if you have some corrupt bits in your framebuffer. Or more likely perhaps you're just writing a value erroneously to an address that corrupts your data and then expands as a result of your algorithm.

OTOH your algorithm or setup may introduce noise that simply gets rounded/truncated in the 8 bit image, but causes this high frequency corruption in your float algorthm.

The blackness looks like some kind of clamping issue and a symptom of the earlier problem.

Since it's not clear whether the high frequency artifacts in your float image are intentional it's difficult to be sure. You should try to read back the image and examine the regions where the ripples start.

Ask yourself if the pattern is consistent and consider memory corruption of your float buffer.

[This message has been edited by dorbie (edited 12-02-2003).]

sek
12-03-2003, 03:35 AM
Ask yourself if the pattern is consistent and consider memory corruption of your float buffer.

[This message has been edited by dorbie (edited 12-02-2003).][/B]

Thanks Dorbie... Here is some more info:

- The 8-bit frame buffer is not part of my rendering loop. I only render into the frame buffer to display once in a while, but I don't use that data for future passes.

- The high frequency stuff is not intentional.

- I have been reading the data out and it seems as though the high frequency areas correspond to very large numbers/exponents such as 1.55143e+018 or -1.12873e+015. The black seems to correspond to 1.#QNAN.

- The pattern is definitely not reproducible from run to run. Sometimes the artifacts begin in the gray area where the only thing that is happening is Enew.xyz = Eold.xyz + 0.17*[0.5 - 0.5] =Eold.xyz (because 0.5 - 0.5 = 0)

Perplexed...

Won
12-03-2003, 03:54 AM
Could you post your fragment program and rendering algorithm pseudocode? Stick it on your web page or something.

Out of curiosity: what exactly are you simulating? Some kind of compressible fluid flow?

-Won

sek
12-03-2003, 10:51 AM
Thanks for your responses. I just figured out my problem (actually a buddy did). I was over clocking my memory at 1015 MHz. When I Knocked it back down to the specification it worked properely.


Originally posted by Won:
Could you post your fragment program and rendering algorithm pseudocode? Stick it on your web page or something.

Out of curiosity: what exactly are you simulating? Some kind of compressible fluid flow?

-Won