[Mesa-dev] Implement NV_fog_distance for Gallium hardware
nmiell at gmail.com
Mon Sep 19 22:50:50 PDT 2011
On 09/19/2011 10:23 AM, Ian Romanick wrote:
> I guess the big question is... why? With vertex shaders, this
> functionality is not terribly useful. Over the past few weeks we've
> been *removing* code like this, so it seems kind of odd to add some of
> it. If I'm not mistaken, the only hardware in Mesa that can do this
> but not vertex shaders is NV10. Is it really that helpful?
> I'm not necessarily opposed to adding this, I just want to be sure
> we're giving it full thought... that's all.
Good question. In the general case, I'd agree with you that implementing
ancient extensions is a waste of effort, but this one is (AFAICT) an
extremely low impact change that benefits a number of existing projects.
It even has new code being written to target it, oddly enough (which is
what prompted my interest in the first place).
My first pass at this actually skipped the extension entirely and just
changed the generated vertex program to always use the eye radial
distance, but I figured that a full implementation of the extension
would be the correct thing to do, especially when there may be some
program out in the wild that breaks if the fog distance isn't abs(Ze).
More information about the mesa-dev