About Error while using shadertoy.com examples
See original GitHub issuefeature request?
– OR –
bug report?
Hello good afternoon
About Error while using shadertoy.com examples
I tried to use the following GLSL script, but it generated an error, you can do a simulation please
https://www.shadertoy.com/view/Ms2SD1
library version
npm ls gl-react gl-react-dom gl-react-native gl-react-expo # Please run and paste the output of this
├── gl-react@3.15.0 └── gl-react-dom@3.15.0
Expected behavior
Work
Actual behavior
Not Work
Steps to reproduce the behavior
https://gist.github.com/mozgbrasil/42b46029db7304b79192321ee1e84735
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
failure to return - Shadertoy
Apparently GLSL doesn't require all codepaths to return a value, so you'll get undefined behavior on the left half of this shader.
Read more >Fakepath - Shadertoy
Created by cyberjax in 2021-04-02. A simple example that produces the following compiler error. Unknown Error: C:\fakepath(95,7-32): error ...
Read more >This should be allowed! - Shadertoy
Compilation success of Common tab is useless, but its failure prompts Shadertoy to block the shader on startup and prevent saving.
Read more >3 - Shadertoy
seems like on linux, at runtime full IEEE floats with ... strangely, compilation errors show up only if another compil error (e.g. redef)....
Read more >SHADER ERROR!
We use cookies to give you the best experience on our website. If you continue using Shadertoy, we'll assume that you are happy...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
similarly there is no such
void main( out vec4 fragColor, in vec2 fragCoord ) {
entry point in GLSL.entry point is
void main (void)
. it does not take parameters. andfragColor
is actually a global variable calledgl_FragColor
gl-react however will send a
varying vec2 uv;
(need to declare it)that is a value in [0, 1] range
@mozgbrasil
This is a bit closer to what you are looking for https://codesandbox.io/s/zz2w9llpml
There are many things you must change in your example to make it work.
Here is a summary -
void main( out vec4 fragColor, in vec2 fragCoord )
withvoid main (void)
vec3(1)
is enough.This helped - https://stackoverflow.com/questions/24820004/how-to-implement-a-shadertoy-shader-in-three-js 4. Set the time yourself. I built a loop and passed time as a uniform.
The lighting isn’t quite right in my example, I haven’t figured that one out yet. Let me know if you manage to find a solution for that.