Browse Source

Merge pull request #1067 from Lopuska/patch-13

bugfix #1066
Daniel Buckmaster 10 years ago
parent
commit
6822a78fcf

+ 15 - 1
Engine/source/shaderGen/GLSL/pixSpecularGLSL.cpp

@@ -111,6 +111,20 @@ ShaderFeature::Resources PixelSpecularGLSL::getResources( const MaterialFeatureD
    return res;
    return res;
 }
 }
 
 
+void SpecularMapGLSL::processVert(Vector<ShaderComponent*> &componentList, const MaterialFeatureData &fd)
+{
+   MultiLine *meta = new MultiLine;
+
+   // Add the texture coords.
+   getOutTexCoord("texCoord",
+     "vec2",
+      true,
+      fd.features[MFT_TexAnim],
+      meta,
+      componentList);
+
+   output = meta;
+}
 
 
 void SpecularMapGLSL::processPix( Vector<ShaderComponent*> &componentList, const MaterialFeatureData &fd )
 void SpecularMapGLSL::processPix( Vector<ShaderComponent*> &componentList, const MaterialFeatureData &fd )
 {
 {
@@ -150,4 +164,4 @@ void SpecularMapGLSL::setTexData( Material::StageData &stageDat,
       passData.mSamplerNames[ texIndex ] = "specularMap";
       passData.mSamplerNames[ texIndex ] = "specularMap";
       passData.mTexSlot[ texIndex++ ].texObject = tex;
       passData.mTexSlot[ texIndex++ ].texObject = tex;
    }
    }
-}
+}

+ 4 - 1
Engine/source/shaderGen/GLSL/pixSpecularGLSL.h

@@ -58,6 +58,9 @@ class SpecularMapGLSL : public ShaderFeatureGLSL
 {
 {
 
 
 public:
 public:
+   virtual void processVert( Vector<ShaderComponent*> &componentList,
+                             const MaterialFeatureData &fd );
+
    virtual void processPix( Vector<ShaderComponent*> &componentList, 
    virtual void processPix( Vector<ShaderComponent*> &componentList, 
       const MaterialFeatureData &fd );
       const MaterialFeatureData &fd );
 
 
@@ -74,4 +77,4 @@ public:
    }
    }
 };
 };
 
 
-#endif // _PIXSPECULAR_HLSL_H_
+#endif // _PIXSPECULAR_HLSL_H_

+ 15 - 1
Engine/source/shaderGen/HLSL/pixSpecularHLSL.cpp

@@ -111,6 +111,20 @@ ShaderFeature::Resources PixelSpecularHLSL::getResources( const MaterialFeatureD
    return res;
    return res;
 }
 }
 
 
+void SpecularMapHLSL::processVert(Vector<ShaderComponent*> &componentList, const MaterialFeatureData &fd)
+{
+   MultiLine *meta = new MultiLine;
+
+   // Add the texture coords.
+   getOutTexCoord("texCoord",
+     "float2",
+      true,
+      fd.features[MFT_TexAnim],
+      meta,
+      componentList);
+
+   output = meta;
+}
 
 
 void SpecularMapHLSL::processPix( Vector<ShaderComponent*> &componentList, const MaterialFeatureData &fd )
 void SpecularMapHLSL::processPix( Vector<ShaderComponent*> &componentList, const MaterialFeatureData &fd )
 {
 {
@@ -150,4 +164,4 @@ void SpecularMapHLSL::setTexData( Material::StageData &stageDat,
       passData.mSamplerNames[ texIndex ] = "specularMap";
       passData.mSamplerNames[ texIndex ] = "specularMap";
       passData.mTexSlot[ texIndex++ ].texObject = tex;
       passData.mTexSlot[ texIndex++ ].texObject = tex;
    }
    }
-}
+}

+ 4 - 1
Engine/source/shaderGen/HLSL/pixSpecularHLSL.h

@@ -58,6 +58,9 @@ class SpecularMapHLSL : public ShaderFeatureHLSL
 {
 {
 
 
 public:
 public:
+   virtual void processVert( Vector<ShaderComponent*> &componentList,
+                             const MaterialFeatureData &fd );
+
    virtual void processPix( Vector<ShaderComponent*> &componentList, 
    virtual void processPix( Vector<ShaderComponent*> &componentList, 
       const MaterialFeatureData &fd );
       const MaterialFeatureData &fd );
 
 
@@ -74,4 +77,4 @@ public:
    }
    }
 };
 };
 
 
-#endif // _PIXSPECULAR_HLSL_H_
+#endif // _PIXSPECULAR_HLSL_H_