Questions tagged [shadertoy]
26 questions
71
votes
5 answers
WebGL/GLSL - How does a ShaderToy work?
I've been knocking around Shadertoy - https://www.shadertoy.com/ - recently, in an effort to learn more about OpenGL and GLSL in particular.
From what I understand so far, the OpenGL user first has to prepare all the geometry to be used and…

Charlie
- 4,197
- 5
- 42
- 59
15
votes
3 answers
Shadertoy - fragCoord vs iResolution vs fragColor
I'm fairly new to Shadertoy and GLSL in general. I have successfully duplicated numerous Shadertoy shaders into Blender without actually knowing how it all works. I have looked for tutorials but I'm more of a visual learner.
If someone could…

Podis
- 379
- 2
- 17
2
votes
1 answer
How to run a shader from Shadertoy in your J/s file with WebGL and GLSL?
I'm new to programming shaders and I want to create a shader with WebGL and GLSL. To see how it really works, I want to test a shader from Shadertoy. But how do you take the code from Shadertoy and actually get to run it in a J/S file? Do you just…

GottaGaming
- 51
- 1
- 10
1
vote
2 answers
Android GLES - Flame shader
I'm quite starter of using GLES 2.0 on Android and I am trying to create a Flame-shaped shader using GLSL. I tried applying the shader from the following link:
https://www.shadertoy.com/view/MdKfDh
However, the result I got is not satisfactory.
The…

JoonSoo Park
- 43
- 12
1
vote
1 answer
How can I record a video of the shader screen with high bitrate from ShaderToy?
I've wrote a noisy shader in ShaderToy that I want to record a video from. ShaderToy provides this option but it captures the screen with very low bitrate. Is there any opportunity to get the video in high bitrate (or frame by frame)?
user13922174
1
vote
1 answer
"Waves" shader is wrapping over
So I wrote this GLSL fragment shader for shadertoy:
const float INTENSITY = 0.5;
const float SPEED = 0.5;
const float SIZE = 0.2;
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = gl_FragCoord.xy / iResolution.xy;
vec4 color…

tuxifan
- 29
- 5
1
vote
0 answers
Unity Shader with SCript to WebGL?
Does anyone know how to recode a Shaderlab Shader from Unity with an Script to WebGL Website?
The original code is from Shadertoy. It was then recoded so it works with Unity. (Original Source
I don't know much about shaders so, yeah maybe there is…

Rafael
- 13
- 2
1
vote
1 answer
GLSL Shadertoy, how to storage variables data?
How to use variable in GLSL on https://www.shadertoy.com/new for all call?
Variables float buffer; or vec2 buffer2[1024]; cleaned for each mainImage() call.
Yes, i can save data to video buffer fragColor = data; and get it vec3 buf =…

MikelSV
- 175
- 1
- 8
0
votes
0 answers
Reproducing a shader with pixi.js
I'm trying to reproduce this shadertoy with pixi.js. I am lost because there's no fragCoord and no fragColor in the code. Moreover I don't understand the declarations in the loop. Here is one of my numerous attempts:
precision mediump float;
…

Stéphane Laurent
- 75,186
- 15
- 119
- 225
0
votes
0 answers
Flutter implementing Shadertoy example with negative UV
I'm new to GLSL. I've used this guide to manipulate my image via shaders.
The example in that page works fine for several ShaderToy examples but I've stumbled upon a simple one which I can't get it to work. This is the shadertoy:
This is my Flutter…

alex smith
- 470
- 6
- 16
0
votes
1 answer
GLSL shader variable resets
I'm writing a GLSL shader for raymarching, and I want to implement an orbit camera. For that, I check when the user left clicks to save the current coordinates, and change the angles of the camera depending on what direction the mouse moves.…

Daniel Zufrí Quesada
- 35
- 4
0
votes
0 answers
How to draw a grid procedurally with fragment shader only?
I'm having trouble understanding the code.
Note you can't use vertex shader doing this.
here's kaiware007's grid code:
float grid(vec2 uv, float battery)
{
vec2 size = vec2(uv.y, uv.y * uv.y * 0.2) * 0.01;
uv += vec2(0.0, iTime * 4.0 *…

Simon
- 1
- 1
0
votes
1 answer
Porting ShaderToy to Pixi.js
Im trying to port this shadertoy shadertoy to pixi.js.
Here is my shader:
uniform vec3 iResolution;
uniform float iTime;
uniform float iTimeDelta;
uniform float iFrameRate;
uniform int iFrame;
uniform float iChannelTime[4];
uniform vec3…

Lucho
- 15
- 1
- 5
0
votes
0 answers
GLSL struct operation returns the wrong member variables
I am writing my first series of shaders on shadertoy, and can't seem to find an explanation for the following behaviour. I have defined the Hit struct, and a Union function which takes two Hit variables, and returns the one with minimum rayDist.
In…

Frettini
- 1
- 1
0
votes
0 answers
My shadertoy fbm example has discontinuities, is it the browser or me?
I'm trying to understand GLSL and shaders and have copied an example shader to generate FBM noise and I'm getting discontinuities in the output.
My shader is here: https://www.shadertoy.com/view/mtSGRz
I've copied the example from…

Tom
- 42,844
- 35
- 95
- 101