Topics / Building a game

Graphics

Shader

A shader is a tiny program that runs on the graphics card and decides the colour of every pixel it draws. Lighting, water, glow, cartoon outlines and day-night tint are all shaders.

Watch: see it in 30 seconds

Video coming soon
A 30-second visual explanation

Why it matters for your game

  • Most games never write a shader; they use the engine's built-in ones. You need the word to understand what your AI means by 'that is a shader effect' versus 'that is a sprite'.
  • A shader can change the look of every object at once (evening tint over the whole village) without touching a single image.
  • They are the usual cause of 'it works on my laptop but is black on my phone'; mobile graphics support fewer features.

How it comes up when you talk to your AI

  • 'Vertex shader' (moves the corners), 'fragment or pixel shader' (colours the pixels), 'material' (a shader plus its settings), 'post-processing' (a shader run over the finished frame).
  • 'Unlit' or 'basic material' means no lighting shader at all; A village game can use that for its sprites so they stay bright in every scene.

Ask your AI about it

Paste this into the assistant you build with. It is written to get a useful answer for your own project, not a textbook page.

Explain shaders to someone building a game with an AI: what a vertex shader and a fragment shader do, what a material is, and three visual effects I could ask for that are 'just a shader'. Keep it to what I need to talk about it, not how to write one.

Related terms