setShaderToy method

String setShaderToy(
  1. String fragmentShader
)

**** SET SHADERTOY SHADER Set the shader to be used in the current texture. These are only fragment shaders taken from ShaderToy.com Many of the shaders can be copy/pasted, but they must have only the "image" layer (ie no buffer). Also many of them could be heavy for mobile devices (few FPS). The uniforms actually available and automatically registered are: float iTime vec4 iMouse vec3 iResolution Sampler2D iChannel0-3

Implementation

String setShaderToy(String fragmentShader) {
  return _setShaderToy(
    fragmentShader.toNativeUtf8().cast<ffi.Char>(),
  ).cast<Utf8>().toDartString();
}