Render modes (GoldSrc): Difference between revisions
SirYodaJedi (talk | contribs) (Created page with "{{tabsBar|main=gs|base=render modes}} {{stub}} == 0 - Normal == Brushes are lightmapped and opaque, regardless of if they have {{code|{}} textures. {{code|renderamt}} and {{code|rendercolor}} are unused outside of scrolling textures. == 1 - Color == Allows sprites to be tinted with {{code|rendercolor}}. Same as texture on brushes and MDLs. == 2 - Texture == Enables translucency via {{code|renderamt}}, and alpha-tests {{code|{}} textures on...") |
SirYodaJedi (talk | contribs) m (→4 - Additive) |
||
(7 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
== 0 - Normal == | == 0 - Normal == | ||
Brushes are lightmapped and opaque, regardless of if they have {{code|{}} textures. {{code|renderamt}} and {{code|rendercolor}} are unused outside of [[func_conveyor (GoldSrc)|scrolling textures]]. | Brushes are lightmapped and opaque, regardless of if they have {{code|{}} textures. {{code|renderamt}} and {{code|rendercolor}} are unused outside of [[func_conveyor (GoldSrc)|scrolling textures]]. {{ent|worldspawn|engine=goldsrc}} brushes always use this render mode. | ||
== 1 - Color == | == 1 - Color == | ||
Line 15: | Line 15: | ||
== 4 - Solid == | == 4 - Solid == | ||
Same as Normal, but alpha-tests {{code|{}} textures on brushes. {{code|renderamt}} 0 is treated as invisible, but all other values are full opacity for non-alphatested texels. | Same as Normal, but alpha-tests {{code|{}} textures on brushes. {{code|renderamt}} 0 (or absent) is treated as invisible, but all other values are full opacity for non-alphatested texels. | ||
{{bug|tested=hl25|Sorted as translucent by the renderer, even though it should be part of the opaque pass; this can cause sorting issues with fog. If this is an issue, use an [[MDL (GoldSrc)|MDL]] instead.}} | |||
== | == 5 - Additive == | ||
Renders the sprite, brush, or MDL using [[additive]] translucency ({{ | Renders the sprite, brush, or MDL using [[additive]] translucency ({{mono|[https://registry.khronos.org/OpenGL-Refpages/gl4/html/glBlendFunc.xhtml glBlendFunc(GL_ONE, GL_ONE)]}}). {{code|renderamt}} can be used to reduce opacity. |
Latest revision as of 14:25, 30 April 2025
0 - Normal
Brushes are lightmapped and opaque, regardless of if they have { textures. renderamt and rendercolor are unused outside of scrolling textures. worldspawn brushes always use this render mode.
1 - Color
Allows sprites to be tinted with rendercolor. Same as texture on brushes and MDLs.
2 - Texture
Enables translucency via renderamt, and alpha-tests { textures on brushes. Causes brushes to be fullbright.
3 - Glow
Only valid on sprites. Like additive, but renders the sprite at the same size regardless of distance from the camera.
4 - Solid
Same as Normal, but alpha-tests { textures on brushes. renderamt 0 (or absent) is treated as invisible, but all other values are full opacity for non-alphatested texels.

5 - Additive
Renders the sprite, brush, or MDL using additive translucency (glBlendFunc(GL_ONE, GL_ONE)). renderamt can be used to reduce opacity.