Browse Source

Removed unnecessary #ifdef from varyings.

Lasse Öörni 14 years ago
parent
commit
75d74ea3f1
2 changed files with 38 additions and 42 deletions
  1. 19 21
      SourceAssets/GLSLShaders/Forward.frag
  2. 19 21
      SourceAssets/GLSLShaders/Forward.vert

+ 19 - 21
SourceAssets/GLSLShaders/Forward.frag

@@ -8,29 +8,27 @@ varying vec2 vTexCoord;
     varying vec4 vColor;
 #endif
 varying vec4 vLightVec;
-#ifdef LIGHT
-    #ifdef SPECULAR
-        varying vec3 vEyeVec;
-    #endif
-    #ifndef NORMALMAP
-        varying vec3 vNormal;
-    #endif
-    #ifdef SHADOW
-        #if defined(DIRLIGHT)
-            varying vec4 vShadowPos[4];
-        #elif defined(SPOTLIGHT)
-            varying vec4 vShadowPos;
-        #else
-            varying vec3 vShadowPos;
-        #endif
-    #endif
-    #ifdef SPOTLIGHT
-        varying vec4 vSpotPos;
-    #endif
-    #ifdef POINTLIGHT
-        varying vec3 vCubeMaskVec;
+#ifdef SPECULAR
+    varying vec3 vEyeVec;
+#endif
+#ifndef NORMALMAP
+    varying vec3 vNormal;
+#endif
+#ifdef SHADOW
+    #if defined(DIRLIGHT)
+        varying vec4 vShadowPos[4];
+    #elif defined(SPOTLIGHT)
+        varying vec4 vShadowPos;
+    #else
+        varying vec3 vShadowPos;
     #endif
 #endif
+#ifdef SPOTLIGHT
+    varying vec4 vSpotPos;
+#endif
+#ifdef POINTLIGHT
+    varying vec3 vCubeMaskVec;
+#endif
 
 void main()
 {

+ 19 - 21
SourceAssets/GLSLShaders/Forward.vert

@@ -6,29 +6,27 @@ varying vec2 vTexCoord;
     varying vec4 vColor;
 #endif
 varying vec4 vLightVec;
-#ifdef LIGHT
-    #ifdef SPECULAR
-        varying vec3 vEyeVec;
-    #endif
-    #ifndef NORMALMAP
-        varying vec3 vNormal;
-    #endif
-    #ifdef SHADOW
-        #if defined(DIRLIGHT)
-            varying vec4 vShadowPos[4];
-        #elif defined(SPOTLIGHT)
-            varying vec4 vShadowPos;
-        #else
-            varying vec3 vShadowPos;
-        #endif
-    #endif
-    #ifdef SPOTLIGHT
-        varying vec4 vSpotPos;
-    #endif
-    #ifdef POINTLIGHT
-        varying vec3 vCubeMaskVec;
+#ifdef SPECULAR
+    varying vec3 vEyeVec;
+#endif
+#ifndef NORMALMAP
+    varying vec3 vNormal;
+#endif
+#ifdef SHADOW
+    #if defined(DIRLIGHT)
+        varying vec4 vShadowPos[4];
+    #elif defined(SPOTLIGHT)
+        varying vec4 vShadowPos;
+    #else
+        varying vec3 vShadowPos;
     #endif
 #endif
+#ifdef SPOTLIGHT
+    varying vec4 vSpotPos;
+#endif
+#ifdef POINTLIGHT
+    varying vec3 vCubeMaskVec;
+#endif
 
 void main()
 {