Fog always per vertex?

Nibbie
Posts: 2
Joined: 2008.12
Post: #1
Howdy

Just a quick question: is anyone else having a problem with fog always being per vertex and never per pixel? No matter what you set gl_fog_hint to, I'm always getting per vertex which looks a bit crappy. I've tried on a couple of different Mac's with the same results. One is a MacBook Pro which I'm pretty sure is capable of doing per pixel, so why wouldn't it use it when the hint is set to gl_nicest?

Anyone know a solution to this? How to force per pixel or if it's just not supported on OS X for some reason?

Thanks!

Rob.
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #2
From a quick google search, it looks like that's the only way to make it per-pixel in the fixed pipeline. Of course, hints are just that: they are free to be ignored by the implementation. AFAIK the only way to absolutely guarantee per-pixel is to write a fragment shader to do it for you.
Quote this message in a reply
Nibbie
Posts: 2
Joined: 2008.12
Post: #3
Thanks for the reply. I just found it weird to see the per vertex results when asking for GL_NICEST usually always gives per pixel. It ruins the whole scene. Smile I guess I'm too used to Windows!

Thanks again.
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #4
use a GLSL shader, or go back to windows.

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Nibbie
Posts: 2
Joined: 2008.12
Post: #5
haha how friendly. Smile But I'd rather not go back, thanks all the same. Smile

I'll look at using shaders, but it shouldn't be that complicated for something so simple.
Quote this message in a reply
Post Reply