Godot Documentation: Shader Migration Guide
Many new users have trouble writing shaders. Godot makes it easier by using a customized version of the GLSL spec. However, it is still relatively inaccessible to new users. One thing users do to ease the difficulty of writing shaders is to copy shaders from sites like Shadertoy or The Book of Shaders, but because Godot uses a modified version of GLSL, the shaders from these sites do not fit directly into Godot. many users have asked for a tool to convert other shaders into the Godot spec. Of course such a tool would be very difficult to write and maintain and couldn't hope to cover even a small fraction of the types of shaders out there. In order to help users, instead, I have created a shader migration guide.
The goal is not to supplement the Shading Language Reference but to give readers a bit of an understanding of the differences between Godot and GLSL so that they can learn to port shaders over themselves.
This migration guide covers the main differences between pure GLSL (as used in Shadertoy and The Book of Shaders) from the Godot shading language. The goal is that users can refer to this document when converting shaders into the Godot shading language. It does so by explaining what a given feature looks like in GLSL and then how Godot handles that feature and, if possible, the simplest way to convert that feature from regular GLSL into the Godot shading language.
The main topics covered are:
- Main function
- Coordinate system
In the Variables section. I created a grid which contains all the built in GLSL variables and the uniforms that the popular frameworks pass in by default, I expect that these tables will be the most useful for new users as people have a difficult time understanding what the variables are and where they come from.
GitHub Proof of Authorship
- GitHub Account: https://github.com/clayjohn
- Pull Request: https://github.com/godotengine/godot-docs/pull/1693