Sign in to confirm you’re not a bot
This helps protect our community. Learn more
How to make a Simple Colour Swap Shader in Godot (Code in Description)
83Likes
2,050Views
Aug 252024
How to make a Simple Colour Swap Shader in Godot (Code in Description) Greetings, in this Godot tutorial we shall be covering how to make a color swap shader. A Godot color swap shader allows us to easily tell Godot to swap pixels of a certain colour to be a different colour. In this Godot color swap shader tutorial, we will be using shader code. Godot uses a shading language similar to GLSL ES 3.0. Unlike other tutorials which either use the UI version of creating a shader, I have the shader code in the description below for you to copy and paste. You can skip most of the tutorial and just watch how we attatch the shader to a canvas item like a sprite or UI image if you like. Here is the shader code for the Godot color swap shader: https://pastebin.com/Dv29tyAa Swapping colors is really easy in Godot with this colour swap shader. In this tutorial we will be swapping the red on our mario sprite to be green, so we have luigi without the need for a seperate sprite for luigi. This reduces how many sprites needed in the game which is great for optimisation. If this tutorial on how to make a simple color swap shader in Godot helps, then be sure to subscribe to keep notified when I upload. How to make a Simple Colour Swap Shader in Godot (Code in Description)

Follow along using the transcript.

Max O'Didily

8.42K subscribers