How to change far frustum only for particular Spatials?

Thanks.

Inspired by this thread I’ve found by searching for “space game far planets”, I’ve found a solution on myself. I remembered following rule from my computer graphics class:

In OpenGL fragments are not clipped (because behind the far clipping plane) if and only if -Wc < Xc < Wc AND -Wc < Yc < Wc AND -Wc < Zc < Wc is true, where Xc, Yc, Zc, Wc is the vector of clipping coordinates.

Hence all I had to do was to adjust the vertex shader like this:

vec4 clippingCoordinates = g_WorldViewProjectionMatrix * vec4(inPosition, 1.0);
clippingCoordinates.z = 0;
gl_Position = clippingCoordinates;

Hope this helps others having same problem.