浏览代码

Fix includeininclude ;-)

sebavan 6 年之前
父节点
当前提交
2e2371f637
共有 1 个文件被更改,包括 6 次插入1 次删除
  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)