RENDERMODE Enumerations

From Garry's Mod
Jump to: navigation, search

Enumerations used by Entity:SetRenderMode and Entity:GetRenderMode.

Warning! Decimal values are for reference only! The actual value may be different between two Garry's Mod versions.
Name Decimal Description
RENDERMODE_NORMAL 0 Default render mode. Transparently has no effect.
RENDERMODE_TRANSCOLOR 1 Supports transparency.
RENDERMODE_TRANSTEXTURE 2
RENDERMODE_GLOW 3 Intended for glowing sprites. Allows transparency, and forces the sprite or model to be rendered unlit.

The size of a sprite rendered with Glow is consistent with the screen size (unlike the alternative World Space Glow), making it appear larger at a distance, in comparison to the world.

The GlowProxySize keyvalue affects this Render Mode on sprites.

RENDERMODE_TRANSALPHA 4 Enables Alphatesting. Legacy port from Goldsource. Obsolete in Source due to Alphatesting being handled in materials. Does not allow transparency.

Use this to make alpha of Color work for your entity. For players, it must be set for their active weapon aswell.

RENDERMODE_TRANSADD 5 Add the material's color values to the existing image, instead of performing a multiplication. Sprites will appear through world geometry and the sprite/model will always brighten the world. Allows transparency.
RENDERMODE_ENVIROMENTAL 6 Causes the material to be not be drawn at all, similarly to Don't Render.
RENDERMODE_TRANSADDFRAMEBLEND 7 Functions like Additive, but also blends between animation frames. Requires the material to have a functioning animating texture. Allows transparency.
RENDERMODE_TRANSALPHADD 8 Functions similarly to Additive, except that the alpha channel controls the opacity of the sprite. An example of use is for dark sprites, with an example material being sprites/strider_blackball.vmt.
RENDERMODE_WORLDGLOW 9 Functions similarly to Glow, with the exception that the size of the sprite is relative to the world rather than the screen.

The GlowProxySize keyvalue affects this Render Mode on sprites.

RENDERMODE_NONE 10 The entity is still being drawn and networked albeit invisible, therefore not making this Render Mode ideal for performance reasons.

To completely avoid drawing and networking an entity, see EF_NODRAW.

Personal tools
Navigation