Renderstyle

From ZDoom Wiki
Jump to navigation Jump to search

Render style is how a certain graphic should be rendered in the engine. Render style may apper and be modified...

In ZScript the constats that function as render style names are defined in the ERenderStyle struct.

Available render styles

Note: This section of the page can be included into other pages that describe renderstyles (such as A_SetRenderStyle), using the {{: Renderstyle}} syntax. (This note and the rest of the page will not be included.)
  • STYLE_None - Do not render
  • STYLE_Normal - Regular rendering (all pixels of the graphic are opaque)
  • STYLE_Fuzzy - With a fuzz effect, like the Spectre
  • STYLE_SoulTrans - Each pixel has the same translucency to an amount determined by the transsouls CVAR.
  • STYLE_OptFuzzy - Fuzzy or translucent, based on the value of the r_drawfuzz CVAR.
  • STYLE_Stencil - All pixels are drawn in a single color and fully opaque.
  • STYLE_Translucent - Each pixel is evenly translucent according to the alpha field (from 0.0 to 1.0).
  • STYLE_TranslucentStencil - Like STYLE_Stencil, but supports alpha.
  • STYLE_Add - Additive rendering: each pixel's color is added to the color of the underlying scene. Lighter pixels will appear more opaque and bright, while darker will appear less opaque. Creates a "glowing" effect recommended for things that are meant to emit light, like fire, plasma, etc.
  • STYLE_Shaded - Translucency is applied to each pixel based on its brightness (similar to STYLE_Add), then all pixels are tinted to a specific color. This is how decals are drawn by default.
  • STYLE_Shadow - Equivalent to black translucent stencil with an alpha of 0.3
  • STYLE_Subtract - The opposite of additive: the color value of each pixel is subtracted from the color of the scene, creating a dark translucency of the opposite color, e.g. a red color being subtracted from a white surface will cause a cyan "shadow".
  • STYLE_AddStencil - Combines stencil and additive: all pixels are drawn in a single color, and the whole graphic will be translucent based on the brightness of that color.
  • STYLE_AddShaded - Combines shaded and additive: all pixels are tinted with a specific color, and the translucency of each pixel is set based on the brightness of its color.
  • STYLE_Multiply - Colors of each pixel and the underlying scene are multiplied (hardware renderer only). This results in intense dark tones.
  • STYLE_InverseMultiply - The background scene is inverted, then its colors are multiplied by the colors of each pixels of the graphic (hardware renderer only).
  • STYLE_ColorBlend - Each pixel's color is blended with the color of the underlying scene, and then translucency is applied to each pixel based on its color intensity (hardware renderer only). This allows for per-pixel translucency like STYLE_Add, but there's no "glowing" effect, and instead the graphic appears very faint.
  • STYLE_ColorAdd - Same as STYLE_ColorBlend, but colors are added rather than blended.
  • STYLE_Source - No blending, same as STYLE_Normal (only used internally)