PDA

View Full Version : Color clipping disable in OpenGL



Aekold
12-13-2007, 07:28 AM
Hi,
I'm rendering positions to HDR texture, so I need a full range of values. How can I disable clipping to (0, 1) domain for OpenGL commands like glColor3D?
Thanks,
Peter

Dark Photon
12-13-2007, 07:47 AM
glClampColorARB( GL_CLAMP_VERTEX_COLOR_ARB, GL_FALSE );
glClampColorARB( GL_CLAMP_FRAGMENT_COLOR_ARB, GL_FALSE );
glClampColorARB( GL_CLAMP_READ_COLOR_ARB, GL_FALSE );
See the ARB_color_buffer_float (http://www.opengl.org/registry/specs/ARB/color_buffer_float.txt) extension for details.


The default state for fragment clamping is "FIXED_ONLY", which has the behavior of clamping colors for fixed-point color buffers and not clamping colors for floating-pont color buffers. Vertex colors are clamped by default.

Lindley
12-17-2007, 12:01 PM
Note that if you're using Mesa3D, you'll have to use Mesa's ClampColor function instead since ARB_color_buffer_float isn't supported in Mesa due to IP issues.

Dark Photon
12-18-2007, 07:36 AM
Note that if you're using Mesa3D, you'll have to use Mesa's ClampColor function instead since ARB_color_buffer_float isn't supported in Mesa due to IP issues.
Good to know. (But good grief (patent (http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO1&Sect2=HITOFF&d=PALL&p=1&u=%2Fnetahtml%2FPTO%2Fsrchnum.htm&r=1&f=G&l=50&s1=6650327.PN.&OS=PN/6650327&RS=PN/6650327)). I'm not seeing what's new and novel here? Once might say this patents the half-float number representation too, though that's a trivial extension of IEEE-754.)

dorbie
12-19-2007, 05:35 AM
What you see as trivial and obvious seems like the crown jewels of graphics hardware I.P. to others especially when there are a companies following that innovative direction which was not without controversy at the time, and formed just one keystone in an array of shader oriented development.

FYI - This patent is probably now owned by Microsoft.

http://www.theregister.co.uk/2002/01/16/sgi_transfers_3d_graphics_patents/

If others wanted to own this they should have invested in similar projects and in people like Airey, Peercy, Drebin, Montrym, Dignam, Migdal & Loh, to name a few. Or alternatively made SGI a better offer for the I.P. even as they were cutting that company's throat.

If they find themselves in a pickle now, perhaps it's because they hired the named inventors of that very same I.P. too late.

Don't be so naive as to think that the darling manufacturer of your favorite video card is not filing similar or in fact less fundamental patents nor using them, they all use their patent licensing clout on a daily basis.

dorbie
12-19-2007, 05:52 AM
Here's another beauty:

http://patft.uspto.gov/netacgi/nph-Parse...RS=PN/5,949,424 (http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO2&Sect2=HITOFF&p=1&u=%2Fnetahtml%2FPTO%2Fsearch-bool.html&r=1&f=G&l=50&co1=AND&d=PTXT&s1=5,949,424.PN.&OS=PN/5,949,424&RS=PN/5,949,424)

Does this seem at all familiar to you? Could YOU have invented texture based tangent space hardware bump mapping or did it need someone to show it to you AND give you the hardware to help? Cabral showed it to me and I was one of the first to approximate it in an demo following in his footsteps. I have met <censored> who act like it didn't happen though. Fortunately for them we all benefit from the early leadership of Cabral, Peercy and Airey.