Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: 32 bits floatting point blending

  1. #1
    Junior Member Newbie
    Join Date
    Dec 2004
    Posts
    2

    32 bits floatting point blending

    I need to render a particle cloud using blending with unclamped values. I did implemented a 16 bits floating point blending with no problems. But I have not enough precision in this case. In fact, I found that I loose precision when more than 1000 particles are projected on a pixel.

    That's why I want to use 32 bits blending no matter of performance. I tried to use a pBuffer and fragment programs to do so. But it seems that I cannot bind the pBuffer in order to read from it as a texture while I'm rendering to it because of reading latency.

    Do you know a way to do it?

    Thanks

  2. #2

    Re: 32 bits floatting point blending

    No currently available cards support 32bit FP blending. The NV40 cards support FP blending on 4-channel 16bit FP buffers only. There is no way to what you want currently.

  3. #3
    Junior Member Regular Contributor
    Join Date
    Jan 2004
    Location
    Los Angeles, CA, USA
    Posts
    219

    Re: 32 bits floatting point blending

    You may want to try alpha dithering. I havn't tried it myself, but there's a paper on it somewhere; it sounds like it should do the trick.

  4. #4
    Junior Member Newbie
    Join Date
    Dec 2004
    Posts
    2

    Re: 32 bits floatting point blending

    In fact, i don't want to use 32 bits blending using GL_BLEND. I know it doesn't work. My idea is to use two distinct pbuffers and two distinct fragment programs. I enable the first pBuffer in order to write in it and bind the second pBuffer to TEX2 unit.
    Then I render the particle using this fragment program :
    Code :
    !!FP1.0
    TEX R2, f[WPOS], TEX2, RECT;
    TEX R0, f[TEX0], TEX0, RECT;
    MUL R1, f[TEX1], R0;
    ADD o[COLR], R1, R2;
    END
    TEX0 contains a gaussian texture associated to my particle, f[TEX1] is the color of my particle which I don't want to be clamped.

    Then I switch the rendering pBuffers, bind the first pBuffer as TEX2, and bind a copy fragment program:
    Code :
    !!FP1.0
    TEX R2, f[WPOS], TEX2, RECT;
    MOV o[COLR], R2;
    END
    This program copy the data from the first pBuffer in the second one in order to be read when rendering next particle.

    I thought it would work but it don't. But I'm new to use of multiple pBuffers and I don't know if I can switch from one to the other while in rendering process...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •