Garry's Mod Wiki


render.PushCustomClipPlane( Vector normal, number distance )


Pushes a new clipping plane of the clip plane stack and sets it as active.

A max of 2 clip planes are supported on Linux/POSIX, and 6 on Windows.

Issue Tracker: 2687


1 Vector normal
The normal of the clipping plane.
2 number distance
The distance of the plane from the world origin. You can use Vector:Dot between the normal and any point on the plane to find this.


Clips the lower half of your custom entity

function ENT:Draw() local normal = self:GetUp() -- Everything "behind" this normal will be clipped local position = normal:Dot( self:GetPos() ) -- self:GetPos() is the origin of the clipping plane local oldEC = render.EnableClipping( true ) render.PushCustomClipPlane( normal, position ) self:DrawModel() render.PopCustomClipPlane() render.EnableClipping( oldEC ) end

Page Links

Special Pages



Render Time: 49ms

DB GetPage 7
Generate Html 9
SaveChanges (1) 18
Render Body 0
Render Sidebar 6