Garry's Mod Wiki

GM:PreDrawTranslucentRenderables

  boolean GM:PreDrawTranslucentRenderables( boolean isDrawingDepth, boolean isDrawSkybox, boolean isDraw3DSkybox )

Description

Called before all the translucent entities are drawn.

See also GM:PreDrawOpaqueRenderables and GM:PostDrawTranslucentRenderables.

This is a rendering hook which provides a 3d rendering context.
This is still called when r_drawentities or r_drawopaquerenderables is disabled.

Issue Tracker: 3295
This is not called when r_drawtranslucentworld is disabled.

Issue Tracker: 3296

Arguments

1 boolean isDrawingDepth
Whether the current draw is writing depth.
2 boolean isDrawSkybox
Whether the current draw is drawing the 3D or 2D skybox.

In case of 2D skyboxes it is possible for this hook to always be called with this parameter set to true.

3 boolean isDraw3DSkybox
Whether the current draw is drawing the 3D.

Returns

1 boolean
Return true to prevent translucent renderables from drawing.