Shadertoy – conversion of a GLSL example.

Today I will show you how to convert a GLSL source code to Shadertoy source code.
This tutorial will help you better understand the elements involved in shaders and the display interface.
Let’s see what the source code written in GLSL looks like:

To convert it into the source code for Shadertoy online tool, we need to see what is already defined in this tool and what corresponds to the GLSL source code.
Here are some elements:
gl_FragCoord.xy and fragCoord.xy
resolution.yy and iResolution.yy (iResolution.xy )
time and iTime
The Shadertoy does not need special definitions and it is already implemented.
Let’s see the final code to see where there are changes and where not:

Let’s see the result of this source code on shadertoy:

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.