Questions tagged [shadertoy]
26 questions
0
votes
1 answer
Plasma Shader is not rendering as expected
I am trying to hack this Plasma shader from ShaderToy so it works with Spark AR ... I'm very close but there is a weird issue with the shader being compressed into the corner. Are there any shader guru's who can give me some pointers? Here's what it…

Lee Probert
- 10,308
- 8
- 43
- 70
0
votes
0 answers
Why do I get this arbitrary syntax error?
I'm learning GLSL, and I thought it might be a fun project to build a simple raytracer. I can't figure out why I get a weird syntax error on this function:
vec3 rayAt(in ray r, in float t)
{
return r.o + t*r.d;
}
For context, r.o and r.d are…
user17400329
0
votes
1 answer
drawing more than one of my glowing lights makes them share the light, cant split them
I am trying to create two independent glowing lights but when a make the second share the light stretches between the 2
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
// Normalized pixel coordinates (from 0 to 1)
vec2 uv =…

Elemental Raccoon
- 11
- 3
0
votes
0 answers
How can i run ShaderToy code in standalone windows web browser
I have question How can i run ShaderToy code Standalone in windows web browser like firefox or chrome
for example like this code:
#define PI 3.141592653589793
void mainImage(out vec4 fragColor, in vec2 fragCoord)
{
vec2 pixel_count =…

smallbee
- 233
- 1
- 4
- 16
0
votes
0 answers
How to handle errors in Shadertoy React
Is there a way to detect if the fragment shader you pass to the component has any errors? By default, the component renders black and logs the error, but I would like to be able to detect that in code so I can render something else.

Daniel Zufrí Quesada
- 35
- 4
0
votes
0 answers
Replicate shadertoy example in SFML?
I would like to replicate this in SFML, so I wrote this:
Main.cpp
#include
#define WIDTH 800
int main() {
sf::RenderWindow window(sf::VideoMode(WIDTH, WIDTH), "Test");
sf::Shader shader, buffer;
…

nowox
- 25,978
- 39
- 143
- 293
0
votes
0 answers
how to draw a helix in 3d using fragment shader (shadertoy)
I am relatily new to GLSL.
I want to create a solar system model and use it as a wallpaper (using shadertoy) (Something like this and while i have the planets moving correctly i cant figure out how to do the helix paths that follow those…

Zygal
- 1
- 1
0
votes
1 answer
SDF WebGPU. How to modify the code for SDF purpose like in ShaderToy.com?
I want to create a WebGPU version of Shadertoy,
but I can't to prepare the code correctly.
How to draw in @fragment shader for SDF in WebGPU ?
I clipped space [-1,1, 1,1, -1,-1, 1,-1] of canvas
but what I need to do next ?

Teamur
- 67
- 1
- 4
0
votes
0 answers
ShaderToy shader integration with React
I am integrating Shader from Shadertoy in my react project using library
shadertoy-react
I am making this effect https://www.shadertoy.com/view/WlKXWc in my react component.
and I was facing issue with GLS in my console which saying about…

Naman Jain
- 1
- 1
0
votes
0 answers
How to convert Shader from Shadertoy to WebGL?
I'm really struggling to make this shader from Shadertoy into a simple Website with WebGL. Does anyone know how to do that?
I'm new into Shaders and that stuff...
I tried with help of various tutorials from the internet but none of them are helping…

Rafael
- 13
- 2
-1
votes
1 answer
Can't render any shader in React: `Failed to execute 'shaderSource'`
I'm trying to render a simple shader, but with every library I use (gl-react, shadertoy-react, etc), i get the error:
TypeError: Failed to execute 'shaderSource' on 'WebGL2RenderingContext': parameter 1 is not of type 'WebGLShader'.
at…

Daniel Zufrí Quesada
- 35
- 4