Live code fragment shaders in the atom editor by using
ctrl-shift-g
.
File types supported: .glsl
files.
Make sure you install language-glsl for syntax highlighting.
List of default uniforms included. No need to add these into your fragment shaders.
uniform vec2 iResolution;
uniform vec2 iMouse;
uniform float iGlobalTime;
If the shader can't compile then the tab will subtly highlight in red.
For easier error debugging enable the showErrorMessage
flag in the options. This will show a modal with the line the error was caused on.
Create a new .glsl file and type frag and hit enter. This will output the base fragment shader code to get started from.
You can add textures to your fragment shader by right-clicking on the file in the sidebar:
The uniform name will be the filename minus the extension. For example texture.jpg
would be uniform sampler2D texture;
You can remove textures by either right-clicking in the sidebar and selecting Glsl Preview: Remove texture
or by clicking the texture square in the preview pane.
Markdown Preview for the boilerplate code.
three.js for simplifying WebGL.