- Home /
How to make the MainCamera 'far clipping plane' a Sphere
I've searched a long time with different tags like viewdistance drawdistance circle sphere.. but I cannot find any information about this..
How do I set the "draw distance" called "Clipping Planes - far" on the main camera, to a Circle/Sphere form? I can see further in my gameworld near the edges of my screen because the "draw distance" is set to a square as default!
Like in Minecraft, you can set this "draw distance" to a sphere or square, you just loose some FPS if you choose sphere...
Is it really possible that this feature is not implemented in Unity3D ?
Kind regards
Answer by Kiloblargh · Feb 01, 2014 at 08:02 PM
I found this with a quick Google search...
There's no global setting but the solution is to set the far clip plane further away and then use per-layer culling for all visible layers to cull them before that distance and set layerCullSpherical to true.
Thank you, I will try this out again, I looked at it before, but I did not think at that time that it would work. But I'll try now :)
got it to work now, sadly it isn't pretty, because my game uses chunks.. and every chunk is 1 gameobject.. the far clipping plane is making a much smoother transition from nothing to the chunks.. would be nice if there just were a possibility in the near future to just set the far-clipping-plane to a sphere or circle :D
Answer by Zafir · Dec 18, 2017 at 07:05 AM
you should set the layer's layerCullDistance and set the camera's layerCullSpherical as true
like this
float[] distances = new float[32];
distances[0] = 20 //smaller than your camera clipping planes's far value
Camera.main.layerCullDistances = distances;
Camera.main.layerCullSpherical = true;
Answer by JoeStrout · Jul 25, 2018 at 02:51 PM
I believe you could do it by rendering an inverted sphere with a DepthMask shader, positioned before everything else in the render queue.
Answer by Lasent · Feb 01, 2014 at 03:28 PM
Yeah, I'm kinda new to Unity, but I think that's not implemented. If it really bothers you, you could set up a script for every bigger gameobject so that it disables the MeshFilter when the distance is greater than a maxDist between the camera and the gameobject, but I don't know performance-wise how that handles.
Your answer