-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
08902cc
commit 0828467
Showing
9 changed files
with
95 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,6 @@ void e() { | |
} | ||
|
||
int x; | ||
void c() {x;} | ||
void c() {x++;} | ||
|
||
void d() {x;} | ||
void d() {x++;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
int x; | ||
void c() | ||
{ | ||
x; | ||
x++; | ||
} | ||
void d() | ||
{ | ||
x; | ||
x++; | ||
} | ||
void b() | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,28 @@ | ||
#version 330 | ||
|
||
float bar(float x) | ||
{ | ||
float a=6.; | ||
a+=x; | ||
float b=x; | ||
b+=x; | ||
b=34.; | ||
b+=x; | ||
float arr[2]=float[2](7.,8.); | ||
arr=float[2](5.,float(arr.length())); | ||
float m=a*=10,a*=20,a*=30,b++,i++,58.; | ||
return a+b+m; | ||
} | ||
float baz(float a) | ||
{ | ||
float b=a+4.; | ||
b+=sin(a); | ||
float c=b+5.; | ||
c+=sin(b); | ||
return-c+-c+c; | ||
} | ||
out vec3 output; | ||
void main() | ||
void notMain(float x) | ||
{ | ||
output.xyz=vec3(92); | ||
output.xyz=vec3(92)+vec3(bar(x)+baz(x)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,42 @@ | ||
#version 330 | ||
|
||
float bar(float x) | ||
{ | ||
float a = x; | ||
a = 6.; | ||
a = a + x; | ||
|
||
float b = x; | ||
b = b + x; | ||
b = 34.; | ||
b = b + x; | ||
|
||
float arr[2] = float[2](7.,8.); | ||
arr = float[2](5.,float(arr.length())); | ||
|
||
float m = 14.+length(vec3(sin(a *= 10), sin(a *= 20), sin(a *= 30)))+b++; | ||
m = arr[1] + arr[i++]; | ||
m = 58.; | ||
|
||
return a + b + m; | ||
} | ||
float baz(float a) | ||
{ | ||
float b = a + 4.; | ||
b += sin(a); | ||
float c = b + 5.; | ||
c += sin(b); | ||
return c + (-(c - -c)); | ||
} | ||
|
||
int n = 2; | ||
float y = 47.; | ||
out vec3 output; | ||
|
||
float foo(float a) { if (n == 1) return 0.; if (n == 2) return a; return 1.; } | ||
float foo(float a, float b) { if (y > a) return 0.; if (y < b) return a; return 1.; } | ||
|
||
void main() { | ||
void notMain(float x) { | ||
vec3 v = vec3(foo(42.) + foo(50., 70.)); | ||
output.rgb = v; | ||
output.rgb = v + vec3(bar(x) + baz(x)); | ||
} |