encyclopegia.org

Shader

in the Vulkan API. The yellow sections are programmable shader stages which can modify the different data being processed by the pipeline. In computer graphics, a shader is a programmable operation which is applied to data as it moves through the rendering pipeline. Shaders act on data such as vertices and primitives, generate or morph geometries and fragments, and calculate the colors in a rendered image. Shaders can execute a wide variety of operations. In modern real-time computer graphics, shaders are run on graphics processing units (GPUs) - dedicated hardware which provide parallel execution of programs. Because image rendering is an embarrassingly parallel problem (having an Amdahl's index of one), shaders benefit greatly from parallel computing, such as SIMD hardware. The drive for faster rendering has produced highly parallel processors, like GPUs, which are now used for general-purpose computing. Shaders used for general purposes are commonly called compute shaders.

in the Vulkan API. The yellow sections are programmable shader stages which can modify the different data being processed by the pipeline.]] In computer graphics, a shader is a programmable operation which is applied to data as it moves through the rendering pipeline. Shaders act on data such as vertices and primitives, generate or morph geometries and fragments, and calculate the colors in a rendered image. Shaders can execute a wide variety of operations. In modern real-time computer graphics, shaders are run on graphics processing units (GPUs) - dedicated hardware which provide parallel execution of programs. Because image rendering is an embarrassingly parallel problem (having an Amdahl's index of one), shaders benefit greatly from parallel computing, such as SIMD hardware. The drive for faster rendering has produced highly parallel processors, like GPUs, which are now used for general-purpose computing. Shaders used for general purposes are commonly called compute shaders. === Fragment shaders === Fragment shaders, also known as pixel shaders, compute color and other attributes of each fragment: a unit of rendering work affecting at most a single output pixel. The simplest kinds of pixel shaders output one screen pixel as a color value; more complex shaders with multiple inputs/outputs are also possible. Pixel shaders range from simply always outputting the same color, to applying a lighting value, to doing bump mapping, shadows, specular highlights, translucency and other phenomena. They can alter the depth of the fragment (for Z-buffering), or output more than one color if multiple render targets are active. In 3D graphics, a pixel shader alone cannot produce some kinds of complex effects because it operates only on a single fragment, without knowledge of a scene's geometry (i.e. vertex data). However, pixel shaders do have knowledge of the screen coordinate being drawn, and can sample the screen and nearby pixels if the contents of the entire screen are passed as a texture to the shader. This technique can enable a wide variety of two-dimensional postprocessing effects such as blur, or edge detection/enhancement for cartoon/cel shaders. Pixel shaders may also be applied in intermediate stages to any two-dimensional images—sprites or textures—in the pipeline, whereas vertex shaders always require a 3D scene. For instance, a pixel shader is the only kind of shader that can act as a postprocessor or filter for a video stream after it has been rasterized.

References

No reference rows published for this article.

Cite this article

MLA

"Shader." encyclopegia.org, 2026, https://encyclopegia.org/wiki/shader. Accessed 25 November 2026.

Chicago

"Shader." encyclopegia.org. Accessed November 25, 2026. https://encyclopegia.org/wiki/shader.

APA

encyclopegia.org. (2026). Shader. Retrieved November 25, 2026, from https://encyclopegia.org/wiki/shader

Accessed November 25, 2026 · CC BY-SA 4.0 · citation page · JSON

CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1377291979 · 0.5 · snapshot enwiki-001377291979

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.