GL_LINE_SMOOTH and GL_RGBA16F color attachment
I am using GL_LINE_SMOOTH to antialias lines and have following use cases:
- rendering to an offscreen frame buffer object with a regular color attachment (GL_RGBA)
- rendering to an offscreen frame buffer object with a floating point color attachment (GL_RGBA16F or GL_RGBA32F)
In the first case, line antialiasing works as expected. In the latter case, line antialiasing does not work. (Note that I am not using ARB_multisample).
Anyone knows whether there is a reason for line smoothing to only work when rendering to non-floating point color textures?
I am testing on an Nvidia GTX280, both on linux and windows using the latest Nvidia drivers.
Re: GL_LINE_SMOOTH and GL_RGBA16F color attachment
As far as I know, line antialiasing is actually emulated by the driver as the hardware does not directly supports it. I think I've read one of the GPU programming guides. It said that line antialiasing is done using a texture so actually when you use it, you shall expect that the number of available hardware accelerated texture units decreases by one when you use it.
I suppose the reason why it is not working in case of floating point color attachment is that drivers does not have this emulation in such cases as it may seamed to the driver writers unimportant as line smoothing is a deprecated feature anyway.
Maybe I'm wrong, so you should wait whether others have some clue how to solve your problem, but I hope this clarified some of the possible reasons behind the issue.
Disclaimer: This is my personal profile. Whatever I write here is my personal opinion and none of my statements or speculations are anyhow related to my employer and as such should not be treated as accurate or valid and in no case should those be considered to represent the opinions of my employer.
Technical Blog: http://www.rastergrid.com/blog/