Skip to content

Commit 767fa8f

Browse files
committed
Simplify fragment shaders
1 parent 7c06413 commit 767fa8f

10 files changed

+13
-18
lines changed

ForInstalledPython/glow.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

GlowScriptOffline/glowscript_libraries/glow.3.2.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

GlowScriptOffline3.2.zip

-42 Bytes
Binary file not shown.

lib/glow/shaders.gen.js

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package/glow.3.2.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

shaders/opaque_render_fragment.shader

+1-2
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ void lightAt()
7171

7272
color = light_ambient * diffuse_color;
7373

74-
for (int i=0; i<100; i++) { // for cannot test against a variable
75-
if (i == light_count) break;
74+
for (int i=0; i<light_count; i++) {
7675
calc_color(LP(i), LC(i));
7776
}
7877
}

shaders/peel_color_fragmentC1.shader

+1-2
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ void lightAt()
7373

7474
color = light_ambient * diffuse_color;
7575

76-
for (int i=0; i<100; i++) { // for cannot test against a variable
77-
if (i == light_count) break;
76+
for (int i=0; i<light_count; i++) {
7877
calc_color(LP(i), LC(i));
7978
}
8079
}

shaders/peel_color_fragmentC2.shader

+1-2
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ void lightAt()
7575

7676
color = light_ambient * diffuse_color;
7777

78-
for (int i=0; i<100; i++) { // for cannot test against a variable
79-
if (i == light_count) break;
78+
for (int i=0; i<light_count; i++) {
8079
calc_color(LP(i), LC(i));
8180
}
8281
}

shaders/peel_color_fragmentC3.shader

+1-2
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ void lightAt()
7575

7676
color = light_ambient * diffuse_color;
7777

78-
for (int i=0; i<100; i++) { // for cannot test against a variable
79-
if (i == light_count) break;
78+
for (int i=0; i<light_count; i++) {
8079
calc_color(LP(i), LC(i));
8180
}
8281
}

shaders/peel_color_fragmentC4.shader

+1-2
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ void lightAt()
7474

7575
color = light_ambient * diffuse_color;
7676

77-
for (int i=0; i<100; i++) { // for cannot test against a variable
78-
if (i == light_count) break;
77+
for (int i=0; i<light_count; i++) {
7978
calc_color(LP(i), LC(i));
8079
}
8180
}

0 commit comments

Comments
 (0)