Write your first Godot 4 shader by building an animated portal

First Shader from Zero in Godot 4

Write your first Godot 4 shader by building an animated portal

A step-by-step beginner's guide to writing your first 2D shader in Godot 4. You'll build an animated portal while learning transferable techniques: drawing shapes with math, using smoothstep() for soft edges, masking, periodic functions, noise, and texture sampling. The guide also covers how shaders differ from traditional programming and how to debug them with Godot's visual debugger.

Shaders can seem scary because they require a different way of thinking than traditional programming. While gameplay code is sequential, shader code runs entirely in parallel on the graphics card.
  1. lemmetellya

    Godot is such a delight. Brings me back to working with Flixel and Flash game dev. It's really shaping up to be a powerful tool in a simple package, and it's eating Unity's lunch for game jams these days.

    It's amazing how badly Unity fumbled the bag over the past five years. From messing with developers incomes, to shipping a bunch of half finished copies of the same systems. Just... astonishing.

  2. ehnto

    I started doing shaders out of necessity for a project, I am constantly in awe of what people can produce using shader languages. I thought I was good at manipulating systems and logic in my imagination, but figuring out novel shaders is a level of abstract thinking worth admiration.

  3. OsrsNeedsf2P

    Looks absolutely beautiful and gorgeous

More from this day

2026-09-22