Browse Source

Fix includeininclude ;-)

sebavan 6 years ago
parent
commit
2e2371f637
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/Shaders/ShadersInclude/shadowsFragmentFunctions.fx

+ 6 - 1
src/Shaders/ShadersInclude/shadowsFragmentFunctions.fx

@@ -1,6 +1,11 @@
 #ifdef SHADOWS
     #ifndef SHADOWFLOAT
-        #include<packingFunctions>
+        // Dupplicate to prevent include in include issues
+        float unpack(vec4 color)
+        {
+            const vec4 bit_shift = vec4(1.0 / (255.0 * 255.0 * 255.0), 1.0 / (255.0 * 255.0), 1.0 / 255.0, 1.0);
+            return dot(color, bit_shift);
+        }
     #endif
 
     float computeFallOff(float value, vec2 clipSpace, float frustumEdgeFalloff)