PDA

View Full Version : max clip distance/plane on nVidia hardware



kRogue
10-12-2009, 01:21 PM
Probably not a big deal, but, well, most likely worth mentioning:

GL Spec since 3.1 says that MAX_CLIP_DISTANCE should be atleast 8, but current drivers and for as long as I can remember, nVidia drivers have always given 6.

Just out of curiosity, is this a hardware limit kind of deal or just no one has spotted/cared before?

edit:

Actually there is something really screwball in the spec:
for GL 3.2. core spec (version data 20090803) I see in Section 21.9 (page 97):



This view volume may be further restricted by as many as n client-defined half-
spaces. (n is an implementation-dependent maximum that must be at least 6.)


but in Section G.2 (page 343)



Update MAX_CLIP_DISTANCES from 6 to 8 in section 2.19 and table 6.37,
to match GLSL (bug 4803).


Spec bug?

barthold
10-14-2009, 12:30 PM
MAX_CLIP_DISTANCES should be 8, not 6. You indeed found a spec bug.

Yes, our drivers currently support 6 clip distances. We are fixing this in a future driver release.

Barthold
(with both my hats on)

kRogue
10-14-2009, 01:56 PM
Just to ask to make sure:

on nVidia hardware, clipping happens before any fragment business, i.e. is using gl_ClipDistance[] is better than doing a discard? Additionally, is there some kind of hardware limit on GeForce 8,9 and 200 series for the number of clippers?