Differences in Unity Windows and Mac

I’ve been developing a Unity project in Mac for some months, and now I’ve opened it on Windows and there’s lots of visual problems. My code manually readjusts the camera near and far planes each frame, in order to preserve maximum precision. While this works fine on the Mac, on Windows some things are clipped (while the near/far have the same values).

What could cause this, differences between DirectX and OpenGL?

Since Windows defaults to DirectX I would have thought that would be the most likely culprit.

Try forcing a standalone build to render in OpenGL using the “-force-opengl” command and see if it fixes the problem.

Yes, doing that fixes it. Any idea how to make it work with DirectX too?

I’m not quite sure why the clipping planes would be so different between the two. Unless someone can think of a better solution. the only workaround I can think of at the moment is to use platform dependent compilation:

http://unity3d.com/support/documentation/Manual/Platform%20Dependent%20Compilation.html

Define a different set of parameters for the camera for Windows, and your original set for OSX.

Ok, I guess that’s the best solution for now, thanks :slight_smile: