Render modes: Difference between revisions
m (spam revert) |
SirYodaJedi (talk | contribs) |
||
(28 intermediate revisions by 17 users not shown) | |||
Line 1: | Line 1: | ||
These are all the rendering modes present in | {{lang|Render modes}} | ||
{{tabsBar|main=gs|base=render modes}} | |||
These are all the rendering modes present in {{Source|4}}. | |||
== | == Description == | ||
[[ | [[File:RenderModes Additive WSGlow comparison.jpg|thumb|250px|The ''Additive'' mode sprite on the left cuts through the lamp prop, while the ''World Space Glow'' mode sprite on the right is only rendered if nothing blocks it.]] | ||
In [[Source]] | In [[Source]] ''Render Mode'' ({{mono|rendermode}}) keyvalue controls how an entity's appearance is drawn. Example of use is rendering a sprite properly and applying draw effects onto models. | ||
There are 4 Render Modes that render transparency correctly: ''Glow'', ''Additive'', and their alternatives ''Additive Fractional Frame'' and ''World Space Glow''. The ''Additive'' modes are rendered so that the sprite will cut through any surrounding geometry, while the two ''Glow'' modes are designed to be used for glowing sprites. Of the two Glow modes, ''Glow'' has a fixed size ''on screen'', while ''World Space Glow'' has a fixed size ''in the world''. | |||
[[File:RenderModes_Glow_WSGlow_comparison.jpg|thumb|250px|A comparison of the Glow (above) and World Space Glow (below) rendering modes, for sprites.]] | |||
== Normal (0) == | |||
The default Render Mode. | |||
Transparency keyvalues/inputs will have no effect on entities rendered with this mode. | |||
== Color (1) == | |||
Behaves like the Normal Render Mode, but allows transparency. | |||
== | == Texture (2) == | ||
Same as color. Leftover from GoldSrc, where it would render as fullbright. | |||
== 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. | |||
== | == Solid (4) == | ||
Enables [[$alphatest|Alphatest]]ing. Legacy port from [[Goldsource]]. Obsolete in Source due to Alphatesting being handled in materials. Does not allow translucency. | |||
== Additive (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. Good for big sprites because it wont disappear near the edge of the screen. | |||
== Environmental (6) == | |||
{{not in FGD}} | |||
Causes the material to be not be drawn at all, similarly to Don't Render. | |||
== Additive Fractional Frame (7) == | |||
Functions like Additive, but also blends between animation frames. Requires the material to have a functioning animating texture. Allows transparency. | |||
== Alpha Add (8) == | |||
{{not in FGD}} | |||
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. | |||
== World Space Glow (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. | |||
== | == Don't Render (10) == | ||
Also referred to as ''None''. | |||
The | 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]]. | |||
[[Category:Source]] | |||
[[Category: |
Latest revision as of 16:18, 13 March 2025
These are all the rendering modes present in Source.
Description
In Source Render Mode (rendermode) keyvalue controls how an entity's appearance is drawn. Example of use is rendering a sprite properly and applying draw effects onto models.
There are 4 Render Modes that render transparency correctly: Glow, Additive, and their alternatives Additive Fractional Frame and World Space Glow. The Additive modes are rendered so that the sprite will cut through any surrounding geometry, while the two Glow modes are designed to be used for glowing sprites. Of the two Glow modes, Glow has a fixed size on screen, while World Space Glow has a fixed size in the world.
Normal (0)
The default Render Mode.
Transparency keyvalues/inputs will have no effect on entities rendered with this mode.
Color (1)
Behaves like the Normal Render Mode, but allows transparency.
Texture (2)
Same as color. Leftover from GoldSrc, where it would render as fullbright.
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.
Solid (4)
Enables Alphatesting. Legacy port from Goldsource. Obsolete in Source due to Alphatesting being handled in materials. Does not allow translucency.
Additive (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. Good for big sprites because it wont disappear near the edge of the screen.
Environmental (6)
Causes the material to be not be drawn at all, similarly to Don't Render.
Additive Fractional Frame (7)
Functions like Additive, but also blends between animation frames. Requires the material to have a functioning animating texture. Allows transparency.
Alpha Add (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.
World Space Glow (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.
Don't Render (10)
Also referred to as None.
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.