clip_near
clip_far
Near and far clipping range of a view. Objects will be cut off
along a sharp border when
they are either closer or more distant than the given range.
Range:
clip_near: 1 ..unlimited,
default 15 .
clip_far: clip_near..unlimited,
default 50000 .
Type:
var
Remarks:
- Both
parameters influence the resolution of the Z buffer, whose range is between
clip_near and clip_far.
Today, 3D cards normally have 24 bit z buffer resolution. If the clip_near to clip_far ratio exceeds this resolution, sorting errors will become visible on the screen. In that case either increase clip_near
or decrease clip_far.
This way, the resolution can be
adapted to the requirements of a certain game.
- The smaller the clip_far range,
the fewer objects will be rendered and
the better the frame rate.
- Particles will be clipped at half the clip_far range.
Sky entities and sky blocks are never
clipped.
- The clip_near range can be reduced for certain
entities through the z_near flag.
Example:
camera.clip_near = 5; // allows to go very close to objects
camera.clip_far = 10000; // reduce clip_far for preventing sorting errors
See also:
fog_start,
z_near, clip_particles, depth
► latest
version online