Hi all,
Does anyone out there have a simple demo that shows how to clip GL_FOG to a rectangular region? Or point me in the right direction.
Thanks.
Hi all,
Does anyone out there have a simple demo that shows how to clip GL_FOG to a rectangular region? Or point me in the right direction.
Thanks.
You could create a stencil mask revealing the "clipped" area.
Then you render two times, with and without FOG using the correct
stecil mode.
Thanks for the reply.
Unfortunately I just realised that the problem is actually the difference between DirectX and OpenGL near/far values.
Do you, or anyone else, know how to convert from DirectX near/far fog values to OpenGL start/end values?
The calculations for fog in D3D and OGL are exactly the same when it comes to the fixed function pipeline. I use the exact same values for both the d3d and ogl at work.
Do the same values for for LINEAR FOG? Do you have to set things up differently in OpengL compared to Direct3D? In the Mac Port I'm working on, the D3D values just don't look right on the Mac.
How do you hanlde Fog Density across both APIs then?
Bookmarks