Godot Documentation: Shader Migration Guide

in #utopian-io6 years ago

Repository

Godot Docs and Godot.

Details

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.

Components

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:

  • Varyings
  • Types
  • Macros
  • Main function
  • Variables
  • 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.

Links

http://docs.godotengine.org/en/latest/tutorials/shading/migrating_to_godot_shader_language.html

GitHub Proof of Authorship

Sort:  

Hello @clayjohn,

I am really happy to see that you have submitted another contribution.

It might not be staff pick as the last one but it's a great contribution.

As I have always said I am really happy to see you being dedicated to the project.

I will wish you best and wait for more contributions from you.

Thanks for writing awesome documentation. ;)

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Thank you for your review, @ms10398!

So far this week you've reviewed 2 contributions. Keep up the good work!

You're making incredibly good documentation. I don't use Godot now, but if I do, it is awesome to know how much documentation is available.

Hi @clayjohn! We are @steem-ua, a new Steem dApp, using UserAuthority for algorithmic post curation! Your post is eligible for our upvote, thanks to our collaboration with @utopian-io! Thanks for your contribution, keep up the good work, and feel free to join our @steem-ua Discord server

Hey, @clayjohn!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!


Congratulations @clayjohn!
You raised your level and are now a Minnow!

Do not miss the last post from @steemitboard:

SteemitBoard knock out by hardfork

Support SteemitBoard's project! Vote for its witness and get one more award!

Congratulations @clayjohn! You have completed the following achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of upvotes

Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word STOP

Do you like SteemitBoard's project? Then Vote for its witness and get one more award!