Welcome, Unregistered.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Reply
Old 22-Oct-2007, 15:48   #1
PeterT
Member
 
Join Date: May 2002
Location: Austria
Posts: 699
OpenGL OpenGL FP32 bilinear filtering specification/accuracy

I'm currently implementing an algorithm that would benefit from using the built-in FP32 linear filtering on g80. However, testing has revealed that this filtering has deviations of 5%-10% from my software filter implementation.

Does anyone know how and with which precision FP32 bilinear filtering is implemented on G80? Note that I'm not doing any minification or magnification, just offsetting by a sub-pixel amount.

(If you've read this post before the edit please ignore what you read then )

Last edited by PeterT; 22-Oct-2007 at 15:26. Reason: I'm an idiot.
PeterT is offline   Reply With Quote
Old 22-Oct-2007, 17:19   #2
nAo
Nutella Nutellae
 
Join Date: Feb 2002
Location: San Francisco
Posts: 4,297
Default

Can we see your software implementation?
__________________
[twitter]
More samples, we need more samples! [Dean Calver]
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way
nAo is offline   Reply With Quote
Old 23-Oct-2007, 04:58   #3
armchair_architect
Member
 
Join Date: Nov 2006
Posts: 128
Default

I don't think any mainstream gfx cards use full fp32 precision for the filter weights in the bilinear filter. I think its more like 8-12 bits of precision.

You can test this easily enough: create a 2x1 texture with black in one pixel and white in the other. Then map it onto a big wide quad, with texcoords 0.0 on the left and 1.0 on the right, and bilinear filtering. The number of different shades of gray you get tells you the filter precision (256 shades => 8 bits).
armchair_architect is offline   Reply With Quote
Old 23-Oct-2007, 23:50   #4
Andrew Lauritzen
AndyTX
 
Join Date: May 2004
Location: British Columbia, Canada
Posts: 1,845
Default

I believe the alpha value in the interpolation is truncated somewhat; I had trouble with the same thing when playing with some real-time Bezier surface raytracing.

So while the values drawn from the texture seem to be in full fp32, and the interpolation evaluated as such, there seems to be a limit in the precision of the weight parameter... this may be what you're experiencing.

[Edit] Whoops I see that's what armchair_architect said too. Now I'm really convinced
By "mainstream graphics cards" are you implying that the "professional" cards (Quadro, FireGL) handle this differently?
Andrew Lauritzen is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 22:33.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.