瀏覽代碼

Move code to include

Popov72 5 年之前
父節點
當前提交
d056f8bd67
共有 2 個文件被更改,包括 5 次插入5 次删除
  1. 4 0
      src/Shaders/ShadersInclude/shadowMapFragmentDeclaration.fx
  2. 1 5
      src/Shaders/shadowMap.fragment.fx

+ 4 - 0
src/Shaders/ShadersInclude/shadowMapFragmentDeclaration.fx

@@ -1,3 +1,7 @@
+#if SM_FLOAT == 0
+	#include<packingFunctions>
+#endif
+
 varying float vDepthMetricSM;
 
 #ifdef SM_USEDISTANCE == 1

+ 1 - 5
src/Shaders/shadowMap.fragment.fx

@@ -1,8 +1,4 @@
-#ifndef SM_FLOAT
-	#include<packingFunctions>
-#endif
-
-#include<shadowMapFragmentDeclaration>
+#include<shadowMapFragmentDeclaration>
 
 #ifdef ALPHATEST
 varying vec2 vUV;