LoginSignup
0
0

More than 5 years have passed since last update.

jsdoでshadertoy sandbox その1

Last updated at Posted at 2016-06-12

概要

jsdoでshadertoyのコードを実行したかった。

成果物

写真

toy.JPG

サンプルコード

precision mediump float;
uniform vec2 iResolution;
uniform float iGlobalTime;
uniform sampler2D iChannel0;

void mainImage(out vec4 fragColor, in vec2 fragCoord)
{
    vec4 solidRed = vec4(1.0, 0.0, 0.0, 1.0);
    fragColor = solidRed;
}

void main() 
{
    vec4 color;
    mainImage(color, gl_FragCoord.xy);
    color.w = 1.0;
    gl_FragColor = color;
}   

説明

以下を実装した。
iResolution
iGlobalTime
iChannel0
main()

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0