瀏覽代碼

Merge pull request #1527 from rextimmy/signed_mat_feature_fix

Fix for TerrainFeatGLSL getProcessIndex() signed mismatch
Anis 9 年之前
父節點
當前提交
f38aec7891
共有 1 個文件被更改,包括 5 次插入5 次删除
  1. 5 5
      Engine/source/terrain/glsl/terrFeatureGLSL.cpp

+ 5 - 5
Engine/source/terrain/glsl/terrFeatureGLSL.cpp

@@ -298,7 +298,7 @@ TerrainDetailMapFeatGLSL::TerrainDetailMapFeatGLSL()
 void TerrainDetailMapFeatGLSL::processVert(  Vector<ShaderComponent*> &componentList, 
 void TerrainDetailMapFeatGLSL::processVert(  Vector<ShaderComponent*> &componentList, 
                                              const MaterialFeatureData &fd )
                                              const MaterialFeatureData &fd )
 {
 {
-   const U32 detailIndex = getProcessIndex();
+   const S32 detailIndex = getProcessIndex();
 
 
    // Grab incoming texture coords... the base map feature
    // Grab incoming texture coords... the base map feature
    // made sure this was created.
    // made sure this was created.
@@ -383,7 +383,7 @@ void TerrainDetailMapFeatGLSL::processVert(  Vector<ShaderComponent*> &component
 void TerrainDetailMapFeatGLSL::processPix(   Vector<ShaderComponent*> &componentList, 
 void TerrainDetailMapFeatGLSL::processPix(   Vector<ShaderComponent*> &componentList, 
                                              const MaterialFeatureData &fd )
                                              const MaterialFeatureData &fd )
 {
 {
-   const U32 detailIndex = getProcessIndex();
+   const S32 detailIndex = getProcessIndex();
    Var *inTex = getVertTexCoord( "texCoord" );
    Var *inTex = getVertTexCoord( "texCoord" );
 
 
    MultiLine *meta = new MultiLine;
    MultiLine *meta = new MultiLine;
@@ -616,7 +616,7 @@ TerrainMacroMapFeatGLSL::TerrainMacroMapFeatGLSL()
 void TerrainMacroMapFeatGLSL::processVert(  Vector<ShaderComponent*> &componentList, 
 void TerrainMacroMapFeatGLSL::processVert(  Vector<ShaderComponent*> &componentList, 
                                              const MaterialFeatureData &fd )
                                              const MaterialFeatureData &fd )
 {
 {
-   const U32 detailIndex = getProcessIndex();
+   const S32 detailIndex = getProcessIndex();
 
 
    // Grab incoming texture coords... the base map feature
    // Grab incoming texture coords... the base map feature
    // made sure this was created.
    // made sure this was created.
@@ -674,7 +674,7 @@ void TerrainMacroMapFeatGLSL::processVert(  Vector<ShaderComponent*> &componentL
 void TerrainMacroMapFeatGLSL::processPix(   Vector<ShaderComponent*> &componentList, 
 void TerrainMacroMapFeatGLSL::processPix(   Vector<ShaderComponent*> &componentList, 
                                              const MaterialFeatureData &fd )
                                              const MaterialFeatureData &fd )
 {
 {
-   const U32 detailIndex = getProcessIndex();
+   const S32 detailIndex = getProcessIndex();
    Var *inTex = getVertTexCoord( "texCoord" );
    Var *inTex = getVertTexCoord( "texCoord" );
    
    
    MultiLine *meta = new MultiLine;
    MultiLine *meta = new MultiLine;
@@ -900,7 +900,7 @@ void TerrainNormalMapFeatGLSL::processPix(   Vector<ShaderComponent*> &component
       meta->addStatement( new GenOp( "   @ = tGetMatrix3Row(@, 2);\r\n", new DecOp( gbNormal ), viewToTangent ) );
       meta->addStatement( new GenOp( "   @ = tGetMatrix3Row(@, 2);\r\n", new DecOp( gbNormal ), viewToTangent ) );
    }
    }
 
 
-   const U32 normalIndex = getProcessIndex();
+   const S32 normalIndex = getProcessIndex();
 
 
    Var *detailBlend = (Var*)LangElement::find( String::ToString( "detailBlend%d", normalIndex ) );
    Var *detailBlend = (Var*)LangElement::find( String::ToString( "detailBlend%d", normalIndex ) );
    AssertFatal( detailBlend, "The detail blend is missing!" );
    AssertFatal( detailBlend, "The detail blend is missing!" );