Debian Codegraph @

tests/inputs/example_2d.gdshader

raw
1 // https://github.com/AlDanial/cloc/issues/641
2 shader_type canvas_item;
3
4 uniform float blue = 1.0; // you can assign a default value to uniforms
5
6 void vertex() {
7 // Animate Sprite moving in big circle around its location
8 VERTEX += vec2(cos(TIME)*100.0, sin(TIME)*100.0);
9 }
10
11 void fragment(){
12 // this shader will result in an more bluish sprite
13 COLOR = texture(TEXTURE, UV); //read from texture
14 COLOR.b = blue; //set blue channel to <blue>
15 }