summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/extras/shaders/es2/light.inc.frag9
-rw-r--r--src/extras/shaders/gl3/gooch.frag3
2 files changed, 4 insertions, 8 deletions
diff --git a/src/extras/shaders/es2/light.inc.frag b/src/extras/shaders/es2/light.inc.frag
index 42a25003d..02660f008 100644
--- a/src/extras/shaders/es2/light.inc.frag
+++ b/src/extras/shaders/es2/light.inc.frag
@@ -25,9 +25,8 @@ void adsModelNormalMapped(const in FP vec3 vpos, const in FP vec3 vnormal, const
FP vec3 n = normalize( vnormal );
- int i;
FP vec3 s, ts;
- for (i = 0; i < lightCount; ++i) {
+ for (int i = 0; i < lightCount; ++i) {
FP float att = 1.0;
if ( lights[i].type != TYPE_DIRECTIONAL ) {
s = lights[i].position - vpos;
@@ -75,9 +74,8 @@ void adsModel(const in FP vec3 vpos, const in FP vec3 vnormal, const in FP vec3
FP vec3 n = normalize( vnormal );
- int i;
FP vec3 s;
- for (i = 0; i < lightCount; ++i) {
+ for (int i = 0; i < lightCount; ++i) {
FP float att = 1.0;
if ( lights[i].type != TYPE_DIRECTIONAL ) {
s = lights[i].position - vpos;
@@ -115,9 +113,8 @@ void adModel(const in FP vec3 vpos, const in FP vec3 vnormal, out FP vec3 diffus
FP vec3 n = normalize( vnormal );
- int i;
FP vec3 s;
- for (i = 0; i < lightCount; ++i) {
+ for (int i = 0; i < lightCount; ++i) {
FP float att = 1.0;
if ( lights[i].type != TYPE_DIRECTIONAL ) {
s = lights[i].position - vpos;
diff --git a/src/extras/shaders/gl3/gooch.frag b/src/extras/shaders/gl3/gooch.frag
index 1beab1c01..168a862f8 100644
--- a/src/extras/shaders/gl3/gooch.frag
+++ b/src/extras/shaders/gl3/gooch.frag
@@ -28,8 +28,7 @@ vec3 goochModel( const in vec3 pos, const in vec3 n )
vec3 kwarm = clamp(kyellow + beta * kd, 0.0, 1.0);
vec3 result = vec3(0.0);
- int i;
- for (i = 0; i < lightCount; ++i) {
+ for (int i = 0; i < lightCount; ++i) {
// Calculate the vector from the light to the fragment
vec3 s = normalize( vec3( lights[i].position ) - pos );