All examples · Shaders and post

Post-processing

What this example shows

A shader over the whole frame rather than over one object. usePostProcess adds one to the game's chain and returns the effect, so you tune it by changing its fields and switch it off with enabled, which keeps its place between the effects around it; removing and re-adding it would lose that.

The function is the same fn effect(color, uv) a sprite material uses, so CRT lines written for one run on the other unchanged: only now color is the finished frame and uv walks the whole screen. Click the canvas to cycle. Watch the IDENTITY step: it returns the colour untouched, so it must be indistinguishable from OFF.

Starting