Shader chains

Shaders are effects applied to everything you see in the 3D view: pencil sketches, oil paint, retro scanlines, depth of field and dozens more. You can use one effect, or chain several together, and give each one its own settings.

Turning effects on

shader switches effects on, and noshader switches them off. setshadertype chooses the effect:

shader
setshadertype "pencil

shadertypes lists every effect you can use.

Chains

Give setshadertype a list to run several effects one after another, up to 16 of them. Each effect works on the output of the one before:

shader
setshadertype [pencil scanlines]

The same effect can appear more than once, and each copy has its own settings:

setshadertype [charcoal charcoal toon]

Settings for each effect

Each effect has a few settings. shaderparameters tells you what they are, their defaults and their ranges, in order:

show shaderparameters "pencil
[[pressure grain patchsize jitter] [100 100 150 0] [[0 200] [0 200] [40 400] [0 90]]]

setshadersettings sets them. It takes one list, with one entry for each effect in the chain, in the same order as setshadertype. Within each entry, the values go in the order shaderparameters lists them:

setshadertype "pencil
setshadersettings [[100 100 150 45]]

That keeps the pencil’s pressure, grain and patch size at their defaults and sets its stroke jitter to 45.

For a chain, give one entry per effect:

setshadertype [charcoal charcoal toon]
setshadersettings [[150 100] [40 200] [5 100]]

Some handy rules:

  • A shorter list sets only the first effects in the chain. The rest keep their settings.
  • An empty entry, [], leaves that effect unchanged. setshadersettings [[] [40 200]] changes only the second effect.
  • A shorter entry, or a single number, sets only the first values. The rest stay as they were.
  • Values outside a setting’s range are clamped to fit.

shadersettings reports the whole chain in the same form, so you can save the settings and put them back later:

make "saved shadersettings
setshadersettings :saved

When you call setshadertype again, an effect keeps its settings as long as the same effect is still in the same position in the chain. resetall puts every setting back to its default.

Changed in 2026: setshadersettings used to take a shader name first, as in setshadersettings "pencil [...]. It now takes only the list of entries. Programs that use the old form need updating: drop the name and wrap the settings in one more list.

How much, and where

  • setshaderamount mixes each effect with the untouched picture, from 0 to 100 (the default). Give it a number for the whole chain, or a list with one amount per effect.
  • setshaderbackground false keeps the paper and backgrounds of effects like pencil, charcoal, halftone and photo off the background, so the effect applies only to what you draw. Again, give it one value for the whole chain or a list with one per effect.
shader
setshadertype [pencil scanlines]
setshaderamount [100 40]
setshaderbackground false

Find out more

The Environment reference has the full details of every shader command and effect. For the full list of effects added this year, see What’s new in 2026.