浏览代码

Fixed unnecessary inclusion of vertex shader parameters in pixel shader files.

Lasse Öörni 14 年之前
父节点
当前提交
41abbf222d
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      Tools/ShaderCompiler/ShaderCompiler.cpp

+ 3 - 3
Tools/ShaderCompiler/ShaderCompiler.cpp

@@ -283,9 +283,6 @@ void Run(const Vector<String>& arguments)
     XMLElement shader = shaders.GetChildElement("shader");
     while (shader)
     {
-        constants_.Clear();
-        textureUnits_.Clear();
-        
         String source = shader.GetString("name");
         ShaderType compileType = Both;
         String type = shader.GetString("type");
@@ -372,6 +369,9 @@ void Run(const Vector<String>& arguments)
 
 void CompileVariations(const Shader& baseShader, XMLElement& shaders)
 {
+    constants_.Clear();
+    textureUnits_.Clear();
+    
     unsigned combinations = 1;
     PODVector<unsigned> usedCombinations;
     Map<String, unsigned> nameToIndex;