fog on MAC not the same as Win7?

Has anyone seen that fog looks very different on MAC and Windows? On MAC I think it’s broken because when I turn it on it looks like its maximum values are just encasing everything? I’ve tried playing with the settings but its always the same result. below are two pictures, one from the MAC and one from windows. Same exact version of code running through web client, but I also get the same result running locally.

MAC FOG

Windows FOG

Any suggestions on how to fix this on the MAC will be greatly appreciated.

Thanks

Did you find a solution to this? As I’ve recently encountered the same problem.

Thanks

lloudw,

Unfortunately no. I did find the same issue however on a different Windows computer, but the interesting thing is the above 2 screen shots are from the same physical computer. The physical computer is a MAC and the Windows 7 computer is a virtual machine running in fusion, so it’s not a limitation of the hardware, but maybe an issue with the drivers? Maybe the MAC is how its supposed to look with the settings I’ve chosen, but I want it to look like the PC image. So I don’t know and no one ever commented. Maybe you asking will re-energize the post to get some traction.

Hi there,

I encountered the problem as well. I am using linear fog (and an orthographic camera), but the problem is very similar. Any solution so far? : /

So I found on MAC that if I change Density from .6 (Windows) to .0006 (MAC) it seems to work more as expected. I’ve not further tested on Windows but I suspect I’ll have to set it dynamically based on the platform, or compile two different binaries with it set appropriately. However, at least it’s somewhat working now.

I have FOG mode set to exp2. I’ve not played with the other modes to see if they too work with the change to Density.

I kind of got it fixed. The weird thing is, that the fog behaves completely different on mac. It is sort of inverted, but nut exactly.
As I said earlier we have an orthographic camera and linear fog.

For Windows we had:
Fogstart: 0
Fogend: 0.19

After a lot of testing we had very similar results on Mac with:
Fogstart: 1
Fogend: 0.6

I am not sure why this works, but it does. I added this function to our game, to check on what operating system the game is running to adjust the fog-values:

private void CheckRunTimePlatform()
{
float macFogStart = 1;
float macFogEnd = 0.6f;
float winFogStart = 0;
float winFogEnd = 0.19f;
switch(Application.platform)
{
case RuntimePlatform.OSXPlayer:
case RuntimePlatform.OSXEditor:
RenderSettings.fogStartDistance = macFogStart;
RenderSettings.fogEndDistance = macFogEnd;
break;
case RuntimePlatform.WindowsPlayer:
case RuntimePlatform.WindowsEditor:
RenderSettings.fogStartDistance = winFogStart;
RenderSettings.fogEndDistance = winFogEnd;
break;
default:
print(“error in SceneMaster.CheckRunTimePlatform”);
break;
}

thanks for the ftn. I’ll be adding something like this to my engine.

I wonder if this is right vs left handed coordinate system between Windows and MAC so the Z is either positive or negative into the screen, therefore it’s reversed. If that’s the case I don’t know why Unity3D wouldn’t normalize it for us, but I’m glad you stumbled onto this.

Larry