Skip to content

Commit

Permalink
Merge pull request godotengine#2722 from Chaosus/shader_switch
Browse files Browse the repository at this point in the history
Note about switch in shaders
  • Loading branch information
Chaosus authored Aug 24, 2019
2 parents bcc031c + fc57814 commit 8df41be
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tutorials/shading/shading_reference/shading_language.rst
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,19 @@ Godot Shading language supports the most common types of flow control:
}
// switch
switch(i) { // signed integer expression
case -1:
break;
case 0:
return; // break or return
case 1: // pass-through
case 2:
break;
//...
default: // optional
}
// for loops
for (int i = 0; i < 10; i++) {
Expand Down

0 comments on commit 8df41be

Please sign in to comment.