You can use effects created in Shadertoy in Qt Quick Effect Maker. When you use Shadertoy effects, consider the following:
To use a Shadertoy effect in Qt Quick Effect Maker:
Main
function in the code, it looks something like:
void mainImage( out vec4 fragColor, in vec2 fragCoord )
@main
注意:
You can't have
@main
and the following { on the same line.
fragCoord
line, it should look something like:
fragCoord = qt_Vertex.xy;
fragCoord = vec2(qt_Vertex.x, iResolution.y - qt_Vertex.y);
texCoord
and
iMouse
.
Now, the effect runs and looks the same as the Shadertoy effect.