{“vs_code”:”/*MY_VERTEX_SHADER*/\n/* #version 330 core */\n varying vec2 vUv;\n void main() {\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n vUv = uv;\n}”,”fs_code”:”/*MY_FRAGMENT_SHADER */\n/* #version 330 core */\nuniform vec2 u_resolution;\nvarying vec2 vUv;\nvoid main() {\n vec2 uv = gl_FragCoord.xy/u_resolution.xy;\n\n // Move coordinate from (0.0 to 1.0) => (-1.0 to 1.0)\n uv = uv * 2.0 – 1.0;\n \n gl_FragColor=vec4(uv.x,uv.y,0.0,1.0);\n}”,”uniforms”:{“u_time”:{“type”:”f”,”value”:0,”editable”:false},”u_resolution”:{“type”:”v2″,”value”:{“x”:512,”y”:512},”editable”:false},”u_mouse”:{“type”:”v2″,”value”:{“x”:0,”y”:0},”editable”:false}},”description”:”Info about your shader.”,”threeJsSettings”:{“showFloor”:false,”ambientLight”:true,”directionalLight”:true,”selected3DObject”:”Plane”},”attributes”:{“isPublic”:true,”defaultIndex”:1,”categoryId”:31}}
Tut Gradient 2
Written by
in