Răsfoiți Sursa

Merge pull request #1005 from BeamNG/revert_terrain_opengl

Revert terrain opengl
LuisAntonRebollo 10 ani în urmă
părinte
comite
5e4a0fbaa1
37 a modificat fișierele cu 81 adăugiri și 833 ștergeri
  1. 48 224
      Engine/source/terrain/glsl/terrFeatureGLSL.cpp
  2. 0 9
      Engine/source/terrain/terrCellMaterial.cpp
  3. 0 4
      Engine/source/terrain/terrCellMaterial.h
  4. 1 5
      Engine/source/terrain/terrMaterial.cpp
  5. 0 7
      Engine/source/terrain/terrMaterial.h
  6. BIN
      Templates/Empty/game/art/terrains/Example/dirt_grass_n.png
  7. BIN
      Templates/Empty/game/art/terrains/Example/grass1_dry.jpg
  8. BIN
      Templates/Empty/game/art/terrains/Example/grass1_dry_d.png
  9. BIN
      Templates/Empty/game/art/terrains/Example/grass1_dry_n.png
  10. BIN
      Templates/Empty/game/art/terrains/Example/grass1_n.png
  11. BIN
      Templates/Empty/game/art/terrains/Example/grass2_n.png
  12. BIN
      Templates/Empty/game/art/terrains/Example/road_n.png
  13. BIN
      Templates/Empty/game/art/terrains/Example/rocks1_n.png
  14. BIN
      Templates/Empty/game/art/terrains/Example/rocktest_n.png
  15. BIN
      Templates/Empty/game/art/terrains/Example/sand_n.png
  16. BIN
      Templates/Empty/game/art/terrains/Example/snowtop_n.png
  17. BIN
      Templates/Empty/game/art/terrains/Example/stone_n.png
  18. 0 225
      Templates/Empty/game/art/terrains/materials.cs
  19. 5 51
      Templates/Empty/game/tools/worldEditor/gui/TerrainPainterToolbar.ed.gui
  20. 10 82
      Templates/Empty/game/tools/worldEditor/gui/guiTerrainMaterialDlg.ed.gui
  21. 0 7
      Templates/Empty/game/tools/worldEditor/scripts/editors/terrainEditor.ed.cs
  22. 1 23
      Templates/Empty/game/tools/worldEditor/scripts/interfaces/terrainMaterialDlg.ed.cs
  23. BIN
      Templates/Full/game/art/terrains/Example/dirt_grass_n.png
  24. BIN
      Templates/Full/game/art/terrains/Example/grass1_dry_n.png
  25. BIN
      Templates/Full/game/art/terrains/Example/grass1_n.png
  26. BIN
      Templates/Full/game/art/terrains/Example/grass2_n.png
  27. BIN
      Templates/Full/game/art/terrains/Example/road_n.png
  28. BIN
      Templates/Full/game/art/terrains/Example/rocks1_n.png
  29. BIN
      Templates/Full/game/art/terrains/Example/rocktest_n.png
  30. BIN
      Templates/Full/game/art/terrains/Example/sand_n.png
  31. BIN
      Templates/Full/game/art/terrains/Example/snowtop_n.png
  32. BIN
      Templates/Full/game/art/terrains/Example/stone_n.png
  33. 0 33
      Templates/Full/game/art/terrains/materials.cs
  34. 5 51
      Templates/Full/game/tools/worldEditor/gui/TerrainPainterToolbar.ed.gui
  35. 10 82
      Templates/Full/game/tools/worldEditor/gui/guiTerrainMaterialDlg.ed.gui
  36. 0 7
      Templates/Full/game/tools/worldEditor/scripts/editors/terrainEditor.ed.cs
  37. 1 23
      Templates/Full/game/tools/worldEditor/scripts/interfaces/terrainMaterialDlg.ed.cs

+ 48 - 224
Engine/source/terrain/glsl/terrFeatureGLSL.cpp

@@ -379,9 +379,6 @@ void TerrainDetailMapFeatGLSL::processPix(   Vector<ShaderComponent*> &component
    const U32 detailIndex = getProcessIndex();
    Var *inTex = getVertTexCoord( "texCoord" );
 
-   // new terrain
-   bool hasNormal = fd.features.hasFeature(MFT_TerrainNormalMap, detailIndex);
-
    MultiLine *meta = new MultiLine;
 
    // We need the negative tangent space view vector
@@ -450,95 +447,6 @@ void TerrainDetailMapFeatGLSL::processPix(   Vector<ShaderComponent*> &component
    meta->addStatement( new GenOp( "   @ = calcBlend( @.x, @.xy, @, @ );\r\n", 
                                     new DecOp( detailBlend ), detailInfo, inTex, layerSize, layerSample ) );
 
-   // New terrain
-
-   Var *lerpBlend = (Var*)LangElement::find("lerpBlend");
-   if (!lerpBlend)
-   {
-	   lerpBlend = new Var;
-	   lerpBlend->setType("float");
-	   lerpBlend->setName("lerpBlend");
-	   lerpBlend->uniform = true;
-	   lerpBlend->constSortPos = cspPrimitive;
-   }
-
-
-   Var *blendDepth = (Var*)LangElement::find(String::ToString("blendDepth%d", detailIndex));
-   if (!blendDepth)
-   {
-	   blendDepth = new Var;
-	   blendDepth->setType("float");
-	   blendDepth->setName(String::ToString("blendDepth%d", detailIndex));
-	   blendDepth->uniform = true;
-	   blendDepth->constSortPos = cspPrimitive;
-   }
-
-   Var *baseColor = (Var*)LangElement::find("baseColor");
-   Var *outColor = (Var*)LangElement::find(getOutputTargetVarName(DefaultTarget));
-
-   if (!outColor)
-   {
-	   // create color var
-	   outColor = new Var;
-	   outColor->setType("float4");
-	   outColor->setName("col");
-       outColor->setStructName("OUT");
-	   meta->addStatement(new GenOp("   @;\r\n", outColor));
-   }
-
-   Var *detailColor = (Var*)LangElement::find("detailColor");
-   if (!detailColor)
-   {
-	   detailColor = new Var;
-	   detailColor->setType("float4");
-	   detailColor->setName("detailColor");
-	   meta->addStatement(new GenOp("   @;\r\n", new DecOp(detailColor)));
-   }
-
-   // Get the detail texture.
-   Var *detailMap = new Var;
-   detailMap->setType("sampler2D");
-   detailMap->setName(String::ToString("detailMap%d", detailIndex));
-   detailMap->uniform = true;
-   detailMap->sampler = true;
-   detailMap->constNum = Var::getTexUnitNum();     // used as texture unit num here
-
-   // Get the normal map texture.
-   Var *normalMap = _getNormalMapTex();
-
-   // Issue happens somewhere here -----
-
-   // Sample the normal map.
-   //
-   // We take two normal samples and lerp between them for
-   // side projection layers... else a single sample.
-   LangElement *texOp;
-
-   // Note that we're doing the standard greyscale detail 
-   // map technique here which can darken and lighten the 
-   // diffuse texture.
-   //
-   // We take two color samples and lerp between them for
-   // side projection layers... else a single sample.
-   //
-   if (fd.features.hasFeature(MFT_TerrainSideProject, detailIndex))
-   {
-	   meta->addStatement(new GenOp("   @ = ( lerp( tex2D( @, @.yz ), tex2D( @, @.xz ), @.z ) * 2.0 ) - 1.0;\r\n",
-		   detailColor, detailMap, inDet, detailMap, inDet, inTex));
-
-	   texOp = new GenOp("lerp( tex2D( @, @.yz ), tex2D( @, @.xz ), @.z )",
-		   normalMap, inDet, normalMap, inDet, inTex);
-   }
-   else
-   {
-	   meta->addStatement(new GenOp("   @ = ( tex2D( @, @.xy ) * 2.0 ) - 1.0;\r\n",
-		   detailColor, detailMap, inDet));
-
-	   texOp = new GenOp("tex2D(@, @.xy)", normalMap, inDet);
-   }
-
-   // New terrain
-
    // Get a var and accumulate the blend amount.
    Var *blendTotal = (Var*)LangElement::find( "blendTotal" );
    if ( !blendTotal )
@@ -550,96 +458,7 @@ void TerrainDetailMapFeatGLSL::processPix(   Vector<ShaderComponent*> &component
    }
 
    // Add to the blend total.
-   meta->addStatement( new GenOp( "   @ = max( @, @ );\r\n", blendTotal, blendTotal, detailBlend ) );
-
-   // New terrain
-   Var *bumpNorm = (Var*)LangElement::find("bumpNormal");
-   Var *invBlend = (Var*)LangElement::find("invBlend");
-   Var *currentAlpha = (Var*)LangElement::find("currentAlpha");
-   Var *ma = (Var*)LangElement::find("ma");
-   Var *b1 = (Var*)LangElement::find("b1");
-   Var *b2 = (Var*)LangElement::find("b2");
-
-   // Get a var and accumulate the blend amount.
-   if (!currentAlpha)
-   {
-	   currentAlpha = new Var;
-	   currentAlpha->setName("currentAlpha");
-	   currentAlpha->setType("float");
-	   meta->addStatement(new GenOp("   @ = 0;\r\n", new DecOp(currentAlpha)));
-   }
-
-   if (hasNormal)
-   {
-	   // create bump normal
-	   bool bumpNormWasDefined = bumpNorm ? true : false;
-	   LangElement *bumpNormDecl = bumpNorm;
-
-	   if (!bumpNormWasDefined)
-	   {
-		   bumpNorm = new Var;
-		   bumpNorm->setName("bumpNormal");
-		   bumpNorm->setType("float4");
-		   bumpNormDecl = new DecOp(bumpNorm);
-	   }
-	   meta->addStatement(new GenOp("   @ = @;\r\n", bumpNormDecl, texOp));
-	   meta->addStatement(new GenOp("   @.a = max(@.a, 0.000001);\r\n", bumpNorm, bumpNorm));
-
-	   // -----
-
-	   // Get a var and accumulate the blend amount.
-	   if (!invBlend)
-	   {
-		   invBlend = new Var;
-		   invBlend->setName("invBlend");
-		   invBlend->setType("float");
-		   meta->addStatement(new GenOp("   @;\r\n", new DecOp(invBlend)));
-	   }
-
-	   // Get a var and accumulate the blend amount.
-	   if (!ma)
-	   {
-		   ma = new Var;
-		   ma->setName("ma");
-		   ma->setType("float");
-		   meta->addStatement(new GenOp("   @;\r\n", new DecOp(ma)));
-	   }
-
-	   // Get a var and accumulate the blend amount.
-	   if (!b1)
-	   {
-		   b1 = new Var;
-		   b1->setName("b1");
-		   b1->setType("float");
-		   meta->addStatement(new GenOp("   @;\r\n", new DecOp(b1)));
-	   }
-	   // Get a var and accumulate the blend amount.
-	   if (!b2)
-	   {
-		   b2 = new Var;
-		   b2->setName("b2");
-		   b2->setType("float");
-		   meta->addStatement(new GenOp("   @;\r\n", new DecOp(b2)));
-	   }
-
-	   meta->addStatement(new GenOp("   if( @ <= 0 ) \r\n   { \r\n", lerpBlend));
-
-	   meta->addStatement(new GenOp("      @ = 1-@;\r\n", invBlend, detailBlend));
-
-	   meta->addStatement(new GenOp("      @ = max(@.a + @, @ + @) - @;\r\n", ma, bumpNorm, detailBlend, currentAlpha, invBlend, blendDepth));
-
-	   meta->addStatement(new GenOp("      @ = max(@.a + @ - @, 0);\r\n", b1, bumpNorm, detailBlend, ma));
-
-	   meta->addStatement(new GenOp("      @ = max(@ + @ - @, 0);\r\n", b2, currentAlpha, invBlend, ma));
-
-	   meta->addStatement(new GenOp("   }\r\n"));
-   }
-   else
-   {
-	   meta->addStatement(new GenOp("   @ = max(@,@);\r\n", currentAlpha, currentAlpha, detailBlend));
-   }
-
-   // New terrain
+   meta->addStatement( new GenOp( "   @ += @;\r\n", blendTotal, detailBlend ) );
 
    // If we had a parallax feature... then factor in the parallax
    // amount so that it fades out with the layer blending.
@@ -676,36 +495,58 @@ void TerrainDetailMapFeatGLSL::processPix(   Vector<ShaderComponent*> &component
       return;
    }
 
-   // used as texture unit num here
+   Var *detailColor = (Var*)LangElement::find( "detailColor" ); 
+   if ( !detailColor )
+   {
+      detailColor = new Var;
+      detailColor->setType( "vec4" );
+      detailColor->setName( "detailColor" );
+      meta->addStatement( new GenOp( "   @;\r\n", new DecOp( detailColor ) ) );
+   }
+
+   // Get the detail texture.
+   Var *detailMap = new Var;
+   detailMap->setType( "sampler2D" );
+   detailMap->setName( String::ToString( "detailMap%d", detailIndex ) );
+   detailMap->uniform = true;
+   detailMap->sampler = true;
+   detailMap->constNum = Var::getTexUnitNum();     // used as texture unit num here
 
    // If we're using SM 3.0 then take advantage of 
    // dynamic branching to skip layers per-pixel.
+   
 
    if ( GFX->getPixelShaderVersion() >= 3.0f )
       meta->addStatement( new GenOp( "   if ( @ > 0.0f )\r\n", detailBlend ) );
 
    meta->addStatement( new GenOp( "   {\r\n" ) );
 
+   // Note that we're doing the standard greyscale detail 
+   // map technique here which can darken and lighten the 
+   // diffuse texture.
+   //
+   // We take two color samples and lerp between them for
+   // side projection layers... else a single sample.
+   //
+   if ( fd.features.hasFeature( MFT_TerrainSideProject, detailIndex ) )
+   {
+      meta->addStatement( new GenOp( "      @ = ( lerp( tex2D( @, @.yz ), tex2D( @, @.xz ), @.z ) * 2.0 ) - 1.0;\r\n", 
+                                                detailColor, detailMap, inDet, detailMap, inDet, inTex ) );
+   }
+   else
+   {
+      meta->addStatement( new GenOp( "      @ = ( tex2D( @, @.xy ) * 2.0 ) - 1.0;\r\n", 
+                                       detailColor, detailMap, inDet ) );
+   }
 
    meta->addStatement( new GenOp( "      @ *= @.y * @.w;\r\n",
                                     detailColor, detailInfo, inDet ) );
 
-   // New terrain
-   if (hasNormal)
-   {
-	   meta->addStatement(new GenOp("      if( @ <= 0 ) \r\n", lerpBlend));
-	   meta->addStatement(new GenOp("         @.rgb = ((@ + @).rgb * @ + @.rgb * @) / (@ + @);\r\n", outColor, baseColor, detailColor, b1, outColor, b2, b1, b2));
-	   meta->addStatement(new GenOp("      else\r\n"));
-   }
-
-   meta->addStatement(new GenOp("      @ += @ * @;\r\n", outColor, detailColor, detailBlend));
+   Var *baseColor = (Var*)LangElement::find( "baseColor" );
+   Var *outColor = (Var*)LangElement::find( "col" );
 
-   // New terrain
-   if (hasNormal)
-   {
-	   meta->addStatement(new GenOp("      if( @ <= 0 ) \r\n", lerpBlend));
-	   meta->addStatement(new GenOp("         @ = (@.a * @ + @ * @) / (@ + @);\r\n", currentAlpha, bumpNorm, b1, currentAlpha, b2, b1, b2));
-   }
+   meta->addStatement( new GenOp( "      @ = lerp( @, @ + @, @ );\r\n",
+                                    outColor, outColor, baseColor, detailColor, detailBlend ) );
 
    meta->addStatement( new GenOp( "   }\r\n" ) );
 
@@ -971,9 +812,13 @@ void TerrainMacroMapFeatGLSL::processPix(   Vector<ShaderComponent*> &componentL
    meta->addStatement( new GenOp( "      @ *= @.y * @.w;\r\n",
                                     detailColor, detailInfo, inDet ) );
 
+   Var *baseColor = (Var*)LangElement::find( "baseColor" );
    Var *outColor = (Var*)LangElement::find( "col" );
 
-   meta->addStatement(new GenOp("      @ += @ * @;\r\n", outColor, detailColor, detailBlend));
+   meta->addStatement( new GenOp( "      @ = lerp( @, @ + @, @ );\r\n",
+                                    outColor, outColor, outColor, detailColor, detailBlend ) );
+   //outColor, outColor, baseColor, detailColor, detailBlend ) );
+
    meta->addStatement( new GenOp( "   }\r\n" ) );
 
    output = meta;
@@ -1075,36 +920,15 @@ void TerrainNormalMapFeatGLSL::processPix(   Vector<ShaderComponent*> &component
       texOp = new GenOp( "tex2D(@, @.xy)", normalMap, inDet );
 
    // create bump normal
-   // New terrain
-   Var *bumpNorm = (Var*)LangElement::find("bumpNormal");
-   bool bumpNormWasDefined = bumpNorm ? true : false;
-   LangElement *bumpNormDecl = bumpNorm;
-
-   if (!bumpNormWasDefined)
-   {
-	   bumpNorm = new Var;
-	   bumpNorm->setName("bumpNormal");
-	   bumpNorm->setType("float4");
-	   bumpNormDecl = new DecOp(bumpNorm);
-   }
+   Var *bumpNorm = new Var;
+   bumpNorm->setName( "bumpNormal" );
+   bumpNorm->setType( "vec4" );
 
+   LangElement *bumpNormDecl = new DecOp( bumpNorm );
    meta->addStatement( expandNormalMap( texOp, bumpNormDecl, bumpNorm, fd ) );
 
-   // New terrain
-   Var *lerpBlend = (Var*)LangElement::find("lerpBlend");
-   AssertFatal(lerpBlend, "The lerpBlend is missing!");
-   Var *b1 = (Var*)LangElement::find("b1");
-   AssertFatal(b1, "The b1 is missing!");
-   Var *b2 = (Var*)LangElement::find("b2");
-   AssertFatal(b2, "The b2 is missing!");
-
    // Normalize is done later... 
    // Note: The reverse mul order is intentional. Affine matrix.
-
-   // New terrain
-   meta->addStatement(new GenOp("      if( @ <= 0 ) \r\n", lerpBlend));
-   meta->addStatement(new GenOp("         @ = (tMul( @.xyz, @ ).rgb * @ + @.rgb * @) / (@ + @);\r\n", gbNormal, bumpNorm, viewToTangent, b1, gbNormal, b2, b1, b2));
-   meta->addStatement(new GenOp("      else\r\n"));
    meta->addStatement( new GenOp( "      @ = lerp( @, tMul( @.xyz, @ ), min( @, @.w ) );\r\n", 
       gbNormal, gbNormal, bumpNorm, viewToTangent, detailBlend, inDet ) );
 

+ 0 - 9
Engine/source/terrain/terrCellMaterial.cpp

@@ -574,10 +574,6 @@ bool TerrainCellMaterial::_createPass( Vector<MaterialInfo*> *materials,
       matInfo->detailInfoVConst = pass->shader->getShaderConstHandle( avar( "$detailScaleAndFade%d", i ) );
       matInfo->detailInfoPConst = pass->shader->getShaderConstHandle( avar( "$detailIdStrengthParallax%d", i ) );
 
-	  // New blending
-	  matInfo->lerpBlend = pass->shader->getShaderConstHandle("$lerpBlend");
-	  matInfo->blendDepth = pass->shader->getShaderConstHandle(avar("$blendDepth%d", i));
-
       matInfo->detailTexConst = pass->shader->getShaderConstHandle( avar( "$detailMap%d", i ) );
       if ( matInfo->detailTexConst->isValid() )
       {
@@ -715,11 +711,6 @@ void TerrainCellMaterial::_updateMaterialConsts( Pass *pass )
       pass->consts->setSafe( matInfo->detailInfoVConst, detailScaleAndFade );
       pass->consts->setSafe( matInfo->detailInfoPConst, detailIdStrengthParallax );
 
-	  // New blending
-	  bool lerpBlend = Con::getBoolVariable("$Pref::Terrain::LerpBlend", true);
-	  pass->consts->setSafe(matInfo->lerpBlend, lerpBlend ? 1.0f : 0.0f);
-	  pass->consts->setSafe(matInfo->blendDepth, matInfo->mat->getBlendDepth());
-
 	// macro texture info
 
       F32 macroSize = matInfo->mat->getMacroSize();

+ 0 - 4
Engine/source/terrain/terrCellMaterial.h

@@ -80,10 +80,6 @@ protected:
       GFXShaderConstHandle *detailInfoVConst;
       GFXShaderConstHandle *detailInfoPConst;
 
-	  // New blending
-	  GFXShaderConstHandle *lerpBlend;
-	  GFXShaderConstHandle *blendDepth;
-
 	  GFXShaderConstHandle *macroInfoVConst;
       GFXShaderConstHandle *macroInfoPConst;
    };

+ 1 - 5
Engine/source/terrain/terrMaterial.cpp

@@ -65,8 +65,7 @@ TerrainMaterial::TerrainMaterial()
       mMacroSize( 200.0f ),
       mMacroStrength( 0.7f ),
       mMacroDistance( 500.0f ),
-	  mParallaxScale(0.0f),
-	  mBlendDepth(0.4f)
+      mParallaxScale( 0.0f )
 {
 }
 
@@ -98,9 +97,6 @@ void TerrainMaterial::initPersistFields()
    addField( "parallaxScale", TypeF32, Offset( mParallaxScale, TerrainMaterial ), "Used to scale the height from the normal map to give some self "
 	   "occlusion effect (aka parallax) to the terrain material" );
 
-   addField("blendDepth", TypeF32, Offset(mBlendDepth, TerrainMaterial), "Depth for blending the textures using the new blending method by Lukas Joergensen."
-	   "Higher numbers = larger blend radius.");
-
    Parent::initPersistFields();
 
    // Gotta call this at least once or it won't get created!

+ 0 - 7
Engine/source/terrain/terrMaterial.h

@@ -74,11 +74,6 @@ protected:
    ///
    F32 mParallaxScale;
 
-   /// Depth for blending the textures using the new
-   /// blending method. Higher numbers = larger blend
-   /// radius.
-   F32 mBlendDepth;
-
 public:
 
    TerrainMaterial();
@@ -124,8 +119,6 @@ public:
 
    F32 getParallaxScale() const { return mParallaxScale; }
 
-   F32 getBlendDepth() const { return mBlendDepth; }
-
 };
 
 #endif // _TERRMATERIAL_H_

BIN
Templates/Empty/game/art/terrains/Example/dirt_grass_n.png


BIN
Templates/Empty/game/art/terrains/Example/grass1_dry.jpg


BIN
Templates/Empty/game/art/terrains/Example/grass1_dry_d.png


BIN
Templates/Empty/game/art/terrains/Example/grass1_dry_n.png


BIN
Templates/Empty/game/art/terrains/Example/grass1_n.png


BIN
Templates/Empty/game/art/terrains/Example/grass2_n.png


BIN
Templates/Empty/game/art/terrains/Example/road_n.png


BIN
Templates/Empty/game/art/terrains/Example/rocks1_n.png


BIN
Templates/Empty/game/art/terrains/Example/rocktest_n.png


BIN
Templates/Empty/game/art/terrains/Example/sand_n.png


BIN
Templates/Empty/game/art/terrains/Example/snowtop_n.png


BIN
Templates/Empty/game/art/terrains/Example/stone_n.png


+ 0 - 225
Templates/Empty/game/art/terrains/materials.cs

@@ -20,228 +20,3 @@
 // IN THE SOFTWARE.
 //-----------------------------------------------------------------------------
 
-// ----------------------------------------------------------------------------
-// Sample grass
-// ----------------------------------------------------------------------------
-
-singleton Material(TerrainFX_grass1)
-{
-   mapTo = "grass1";
-   footstepSoundId = 0;
-   terrainMaterials = "1";
-   ShowDust = "1";
-   showFootprints = "1";
-   materialTag0 = "Terrain";
-   effectColor[0] = "0.42 0.42 0 1";
-   effectColor[1] = "0.42 0.42 0 1";
-   impactSoundId = "0";
-};
-
-new TerrainMaterial()
-{
-   internalName = "grass1";
-   diffuseMap = "art/terrains/Example/grass1";
-   detailMap = "art/terrains/Example/grass1_d";
-   detailSize = "10";
-   isManaged = "1";
-   detailBrightness = "1";
-   Enabled = "1";
-   diffuseSize = "200";
-   normalMap = "art/terrains/Example/grass1_n";
-   detailDistance = "1000";
-};
-
-singleton Material(TerrainFX_grass2)
-{
-   mapTo = "grass2";
-   footstepSoundId = 0;
-   terrainMaterials = "1";
-   ShowDust = "1";
-   showFootprints = "1";
-   materialTag0 = "Terrain";
-   effectColor[0] = "0.42 0.42 0 1";
-   effectColor[1] = "0.42 0.42 0 1";
-   impactSoundId = "0";
-};
-
-new TerrainMaterial()
-{
-   internalName = "grass2";
-   diffuseMap = "art/terrains/Example/grass2";
-   detailMap = "art/terrains/Example/grass2_d";
-   detailSize = "10";
-   isManaged = "1";
-   detailBrightness = "1";
-   Enabled = "1";
-   diffuseSize = "200";
-};
-
-singleton Material(TerrainFX_grass1dry)
-{
-   mapTo = "grass1_dry";
-   footstepSoundId = 0;
-   terrainMaterials = "1";
-   ShowDust = "1";
-   showFootprints = "1";
-   materialTag0 = "Terrain";
-   effectColor[0] = "0.63 0.55 0 1";
-};
-
-new TerrainMaterial()
-{
-   internalName = "grass1_dry";
-   diffuseMap = "art/terrains/Example/grass1_dry";
-   detailMap = "art/terrains/Example/grass1_dry_d";
-   detailSize = "10";
-   detailDistance = "100";
-   isManaged = "1";
-   detailBrightness = "1";
-   Enabled = "1";
-   diffuseSize = "250";
-   detailStrength = "2";
-   normalMap = "art/terrains/Example/grass1_dry_n";
-};
-
-singleton Material(TerrainFX_dirt_grass)
-{
-   mapTo = "dirt_grass";
-   footstepSoundId = 0;
-   terrainMaterials = "1";
-   ShowDust = "1";
-   showFootprints = "1";
-   materialTag0 = "Terrain";
-   effectColor[0] = "0.63 0.55 0 1";
-   diffuseMap = "art/terrains/Example/dirt_grass";
-   diffuseSize = "200";
-   normalMap = "art/terrains/Example/dirt_grass_n";
-   detailMap = "art/terrains/Example/dirt_grass_d";
-   detailDistance = "100";
-   internalName = "dirt_grass";
-   isManaged = "1";
-   detailBrightness = "1";
-   enabled = "1";
-};
-
-new TerrainMaterial()
-{
-   internalName = "dirt_grass";
-   diffuseMap = "art/terrains/Example/dirt_grass";
-   detailMap = "art/terrains/Example/dirt_grass_d";
-   detailSize = "5";
-   detailDistance = "100";
-   isManaged = "1";
-   detailBrightness = "1";
-   Enabled = "1";
-   diffuseSize = "200";
-};
-
-// ----------------------------------------------------------------------------
-// Sample rock
-// ----------------------------------------------------------------------------
-
-singleton Material(TerrainFX_rocktest)
-{
-   mapTo = "rocktest";
-   footstepSoundId = "1";
-   terrainMaterials = "1";
-   ShowDust = "1";
-   showFootprints = "1";
-   materialTag0 = "Terrain";
-   impactSoundId = "1";
-   effectColor[0] = "0.25 0.25 0.25 1";
-   effectColor[1] = "0.25 0.25 0.25 0";
-   diffuseMap = "art/terrains/Example/rocktest";
-   diffuseSize = "400";
-   normalMap = "art/terrains/Example/rocktest_n";
-   detailMap = "art/terrains/Example/rocktest_d";
-   detailSize = "10";
-   detailDistance = "100";
-   internalName = "rocktest";
-   isManaged = "1";
-   detailBrightness = "1";
-   enabled = "1";
-};
-
-new TerrainMaterial()
-{
-   internalName = "rocktest";
-   diffuseMap = "art/terrains/Example/rocktest";
-   detailMap = "art/terrains/Example/rocktest_d";
-   detailSize = "10";
-   detailDistance = "100";
-   isManaged = "1";
-   detailBrightness = "1";
-   Enabled = "1";
-   diffuseSize = "400";
-};
-
-// ----------------------------------------------------------------------------
-// Sample rock
-// ----------------------------------------------------------------------------
-
-singleton Material(TerrainFX_stone)
-{
-   mapTo = "stone";
-   footstepSoundId = "1";
-   terrainMaterials = "1";
-   ShowDust = "1";
-   showFootprints = "1";
-   materialTag0 = "Terrain";
-   impactSoundId = "1";
-   effectColor[0] = "0.25 0.25 0.25 1";
-   effectColor[1] = "0.25 0.25 0.25 0";
-   diffuseMap = "art/terrains/Example/stone";
-   diffuseSize = "400";
-   normalMap = "art/terrains/Example/stone_n";
-   detailMap = "art/terrains/Example/stone_d";
-   detailSize = "10";
-   detailDistance = "100";
-   internalName = "stone";
-   isManaged = "1";
-   detailBrightness = "1";
-   enabled = "1";
-};
-
-new TerrainMaterial()
-{
-   internalName = "stone";
-   diffuseMap = "art/terrains/Example/stone";
-   detailMap = "art/terrains/Example/stone_d";
-   detailSize = "10";
-   detailDistance = "100";
-   isManaged = "1";
-   detailBrightness = "1";
-   Enabled = "1";
-   diffuseSize = "400";
-   useSideProjection = "0";
-};
-// ----------------------------------------------------------------------------
-// Sample sand
-// ----------------------------------------------------------------------------
-
-singleton Material(TerrainFX_sand)
-{
-   mapTo = "sand";
-   footstepSoundId = "3";
-   terrainMaterials = "1";
-   ShowDust = "1";
-   showFootprints = "1";
-   materialTag0 = "Terrain";
-   specularPower[0] = "1";
-   effectColor[0] = "0.84 0.71 0.5 1";
-   effectColor[1] = "0.84 0.71 0.5 0.349";
-};
-
-new TerrainMaterial()
-{
-   internalName = "sand";
-   diffuseMap = "art/terrains/Example/sand";
-   detailMap = "art/terrains/Example/sand_d";
-   detailSize = "10";
-   detailDistance = "100";
-   isManaged = "1";
-   detailBrightness = "1";
-   Enabled = "1";
-   diffuseSize = "200";
-   normalMap = "art/terrains/Example/sand_n";
-};

+ 5 - 51
Templates/Empty/game/tools/worldEditor/gui/TerrainPainterToolbar.ed.gui

@@ -210,7 +210,7 @@
       new GuiBitmapCtrl() {
          Enabled = "1";
          Profile = "ToolsGuiDefaultProfile";
-         position = "250 3";
+         position = "270 3";
          Extent = "2 26";
          MinExtent = "1 1";
          bitmap = "tools/gui/images/separator-h.png";
@@ -222,7 +222,7 @@
          Profile = "ToolsGuiDefaultProfile";
          HorizSizing = "right";
          VertSizing = "bottom";
-         Position = "242 5";
+         Position = "262 5";
          Extent = "256 50";
          MinExtent = "8 2";
          canSave = "1";
@@ -370,7 +370,7 @@
       new GuiBitmapCtrl() {
          Enabled = "1";
          Profile = "ToolsGuiDefaultProfile";
-         position = "495 3";
+         position = "525 3";
          Extent = "2 26";
          MinExtent = "1 1";
          bitmap = "tools/gui/images/separator-h.png";
@@ -382,7 +382,7 @@
          Profile = "ToolsGuiTransparentProfile";
          HorizSizing = "right";
          VertSizing = "bottom";
-         position = "510 5";
+         position = "540 5";
          Extent = "120 50";
          MinExtent = "8 2";
          canSave = "1";
@@ -454,53 +454,6 @@
             bitmap = "tools/gui/images/dropslider";
          }; 
       };
-	  
-      new GuiBitmapCtrl() {
-         Enabled = "1";
-         Profile = "ToolsGuiDefaultProfile";
-         position = "618 3";
-         Extent = "2 26";
-         MinExtent = "1 1";
-         bitmap = "tools/gui/images/separator-h.png";
-      };
-	  
-      new GuiControl(LerpBlendCheckButtonContainer,EditorGuiGroup) {
-            position = "628 5";
-            extent = "70 50";
-            minExtent = "8 2";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "ToolsGuiTransparentProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "1";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-
-            new GuiCheckBoxCtrl() {
-               text = " LerpBlend";
-               groupNum = "-1";
-               buttonType = "ToggleButton";
-               useMouseEvents = "0";
-               position = "0 2";
-               extent = "140 18";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiCheckBoxProfile";
-               visible = "1";
-               active = "1";
-               command = "ETerrainEditor.toggleBlendType($ThisControl);";
-               tooltipProfile = "GuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "0";
-               internalName = "LerpBlendCheckBox";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-         };
    };
 };
 //--- OBJECT WRITE END ---
@@ -681,3 +634,4 @@ new GuiMouseEventCtrl(PaintBrushSoftnessSliderCtrlContainer,EditorGuiGroup) {
       value = "0";
    };
 };
+

+ 10 - 82
Templates/Empty/game/tools/worldEditor/gui/guiTerrainMaterialDlg.ed.gui

@@ -20,8 +20,8 @@
       HorizSizing = "center";
       VertSizing = "center";
       position = "221 151";
-      Extent = "394 452";
-      MinExtent = "358 452";
+      Extent = "394 432";
+      MinExtent = "358 432";
       canSave = "1";
       Visible = "1";
       tooltipprofile = "ToolsGuiToolTipProfile";
@@ -106,7 +106,7 @@
          HorizSizing = "left";
          VertSizing = "height";
          position = "202 26";
-         Extent = "185 383";
+         Extent = "185 363";
          MinExtent = "8 2";
          canSave = "1";
          Visible = "1";
@@ -439,7 +439,7 @@
             HorizSizing = "width";
             VertSizing = "bottom";
             position = "6 295";
-            Extent = "185 80";
+            Extent = "185 50";
             MinExtent = "8 2";
             canSave = "1";
             Visible = "1";
@@ -621,78 +621,6 @@
                sinkAllKeyEvents = "0";
                passwordMask = "*";
             };
-            new GuiSliderCtrl(TerrainMaterialDlgBlendDepthSlider) {
-               range = "0.01 0.99";
-               ticks = "0";
-               snap = "0";
-               value = "0.5";
-               position = "39 61";
-               extent = "70 14";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiSliderProfile";
-               visible = "1";
-               active = "1";
-               tooltipProfile = "GuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "0";
-               internalName = "blendDepthSliderCtrl";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-            new GuiTextCtrl() {
-               text = "Blend Depth";
-               maxLength = "1024";
-               margin = "0 0 0 0";
-               padding = "0 0 0 0";
-               anchorTop = "1";
-               anchorBottom = "0";
-               anchorLeft = "1";
-               anchorRight = "0";
-               position = "115 61";
-               extent = "58 15";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiTextProfile";
-               visible = "1";
-               active = "1";
-               tooltipProfile = "GuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "1";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-            new GuiTextEditCtrl(TerrainMaterialDlgBlendDepthTextEdit) {
-               historySize = "0";
-               tabComplete = "0";
-               sinkAllKeyEvents = "0";
-               password = "0";
-               passwordMask = "*";
-               text = "0.3";
-               maxLength = "1024";
-               margin = "0 0 0 0";
-               padding = "0 0 0 0";
-               anchorTop = "0";
-               anchorBottom = "0";
-               anchorLeft = "0";
-               anchorRight = "0";
-               position = "1 59";
-               extent = "35 18";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "ToolsGuiTextEditProfile";
-               visible = "1";
-               active = "1";
-               tooltipProfile = "ToolsGuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "0";
-               internalName = "blendDepthTextEditCtrl";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
          };
 
          new GuiBitmapCtrl() {
@@ -1332,7 +1260,7 @@
          HorizSizing = "width";
          VertSizing = "height";
          position = "6 42";
-         Extent = "189 393";
+         Extent = "189 373";
          MinExtent = "8 2";
          canSave = "1";
          Visible = "1";
@@ -1346,7 +1274,7 @@
             HorizSizing = "width";
             VertSizing = "height";
             position = "0 0";
-            Extent = "189 394";
+            Extent = "189 374";
             MinExtent = "8 2";
             canSave = "1";
             Visible = "1";
@@ -1405,7 +1333,7 @@
          Profile = "ToolsGuiButtonProfile";
          HorizSizing = "left";
          VertSizing = "top";
-         position = "202 414";
+         position = "202 394";
          Extent = "98 22";
          MinExtent = "8 2";
          canSave = "1";
@@ -1424,7 +1352,7 @@
          Profile = "ToolsGuiButtonProfile";
          HorizSizing = "left";
          VertSizing = "top";
-         position = "307 414";
+         position = "307 394";
          Extent = "80 22";
          MinExtent = "8 2";
          canSave = "1";
@@ -1444,7 +1372,7 @@
          HorizSizing = "left";
          VertSizing = "height";
          position = "199 23";
-         Extent = "190 287";
+         Extent = "190 267";
          isContainer = true;
          Visible = false;
          bitmap = "tools/gui/images/inactive-overlay";
@@ -1461,4 +1389,4 @@
       };
    };
 };
-//--- OBJECT WRITE END ---
+//--- OBJECT WRITE END ---

+ 0 - 7
Templates/Empty/game/tools/worldEditor/scripts/editors/terrainEditor.ed.cs

@@ -222,8 +222,6 @@ function EPainter::setup( %this, %matIndex )
    ETerrainEditor.setAction( ETerrainEditor.currentAction );
    EditorGuiStatusBar.setInfo(ETerrainEditor.currentActionDesc);
    ETerrainEditor.renderVertexSelection = true;
-   
-   EWTerrainPainterToolbar-->LerpBlendCheckBox.setValue($Pref::Terrain::LerpBlend);
 }
 
 function onNeedRelight()
@@ -259,11 +257,6 @@ function TerrainEditor::toggleBrushType( %this, %brush )
    %this.setBrushType( %brush.internalName );
 }
 
-function TerrainEditor::toggleBlendType( %this, %check )
-{
-   $Pref::Terrain::LerpBlend = %check.getValue();
-}
-
 function TerrainEditor::offsetBrush(%this, %x, %y)
 {
    %curPos = %this.getBrushPos();

+ 1 - 23
Templates/Empty/game/tools/worldEditor/scripts/interfaces/terrainMaterialDlg.ed.cs

@@ -401,9 +401,6 @@ function TerrainMaterialDlg::setActiveMaterial( %this, %mat )
       %this-->detDistanceCtrl.setText( %mat.detailDistance );      
       %this-->sideProjectionCtrl.setValue( %mat.useSideProjection );
       %this-->parallaxScaleCtrl.setText( %mat.parallaxScale );
-      %blendDepth = mFloor(%mat.blendDepth * 1000)/1000;
-      %this-->blendDepthTextEditCtrl.setText( %blendDepth );
-      %this-->blendDepthSliderCtrl.setValue( %mat.blendDepth );
 
       %this-->macroSizeCtrl.setText( %mat.macroSize );
       %this-->macroStrengthCtrl.setText( %mat.macroStrength );
@@ -457,7 +454,6 @@ function TerrainMaterialDlg::saveDirtyMaterial( %this, %mat )
    %detailDistance = %this-->detDistanceCtrl.getText();   
    %useSideProjection = %this-->sideProjectionCtrl.getValue();   
    %parallaxScale = %this-->parallaxScaleCtrl.getText();
-   %blendDepth = %this-->blendDepthTextEditCtrl.getText();
 
    %macroSize = %this-->macroSizeCtrl.getText();      
    %macroStrength = %this-->macroStrengthCtrl.getText();
@@ -479,8 +475,7 @@ function TerrainMaterialDlg::saveDirtyMaterial( %this, %mat )
          %mat.macroSize == %macroSize &&
          %mat.macroStrength == %macroStrength &&
          %mat.macroDistance == %macroDistance &&         
-         %mat.parallaxScale == %parallaxScale &&
-         %mat.blendDepth == %blendDepth)               
+         %mat.parallaxScale == %parallaxScale )               
       return;
       
    // Make sure the material name is unique.
@@ -514,7 +509,6 @@ function TerrainMaterialDlg::saveDirtyMaterial( %this, %mat )
    %mat.macroDistance = %macroDistance;    
    %mat.useSideProjection = %useSideProjection;
    %mat.parallaxScale = %parallaxScale;
-   %mat.blendDepth = %blendDepth;
    
    // Mark the material as dirty and needing saving.
    
@@ -560,7 +554,6 @@ function TerrainMaterialDlg::snapshotMaterials( %this )
          macroDistance = %mat.macroDistance;
          useSideProjection = %mat.useSideProjection;
          parallaxScale = %mat.parallaxScale;
-         blendDepth = %mat.blendDepth;
       };
    }
 }
@@ -595,7 +588,6 @@ function TerrainMaterialDlg::restoreMaterials( %this )
       %mat.macroDistance = %obj.macroDistance;
       %mat.useSideProjection = %obj.useSideProjection;
       %mat.parallaxScale = %obj.parallaxScale;
-      %mat.blendDepth = %obj.blendDepth;
    }
 }
 
@@ -631,17 +623,3 @@ function TerrainMaterialDlg::_selectTextureFileDialog( %this, %defaultFileName )
       
    return %file;
 }
-
-function TerrainMaterialDlgBlendDepthSlider::onMouseDragged(%this)
-{
-   %value = mFloor(%this.value * 1000)/1000;
-   TerrainMaterialDlgBlendDepthTextEdit.setText(%value);
-   TerrainMaterialDlg.activeMat.blendDepth = %this.value;
-   
-}
-
-function TerrainMaterialDlgBlendDepthTextEdit::onValidate(%this)
-{
-   TerrainMaterialDlgBlendDepthSlider.setValue(%this.getText());
-   TerrainMaterialDlg.activeMat.blendDepth = %this.getText();
-}

BIN
Templates/Full/game/art/terrains/Example/dirt_grass_n.png


BIN
Templates/Full/game/art/terrains/Example/grass1_dry_n.png


BIN
Templates/Full/game/art/terrains/Example/grass1_n.png


BIN
Templates/Full/game/art/terrains/Example/grass2_n.png


BIN
Templates/Full/game/art/terrains/Example/road_n.png


BIN
Templates/Full/game/art/terrains/Example/rocks1_n.png


BIN
Templates/Full/game/art/terrains/Example/rocktest_n.png


BIN
Templates/Full/game/art/terrains/Example/sand_n.png


BIN
Templates/Full/game/art/terrains/Example/snowtop_n.png


BIN
Templates/Full/game/art/terrains/Example/stone_n.png


+ 0 - 33
Templates/Full/game/art/terrains/materials.cs

@@ -47,8 +47,6 @@ new TerrainMaterial()
    detailBrightness = "1";
    Enabled = "1";
    diffuseSize = "200";
-   normalMap = "art/terrains/Example/grass1_n";
-   detailDistance = "1000";
 };
 
 singleton Material(TerrainFX_grass2)
@@ -99,7 +97,6 @@ new TerrainMaterial()
    Enabled = "1";
    diffuseSize = "250";
    detailStrength = "2";
-   normalMap = "art/terrains/Example/grass1_dry_n";
 };
 
 singleton Material(TerrainFX_dirt_grass)
@@ -111,15 +108,6 @@ singleton Material(TerrainFX_dirt_grass)
    showFootprints = "1";
    materialTag0 = "Terrain";
    effectColor[0] = "0.63 0.55 0 1";
-   diffuseMap = "art/terrains/Example/dirt_grass";
-   diffuseSize = "200";
-   normalMap = "art/terrains/Example/dirt_grass_n";
-   detailMap = "art/terrains/Example/dirt_grass_d";
-   detailDistance = "100";
-   internalName = "dirt_grass";
-   isManaged = "1";
-   detailBrightness = "1";
-   enabled = "1";
 };
 
 new TerrainMaterial()
@@ -150,16 +138,6 @@ singleton Material(TerrainFX_rocktest)
    impactSoundId = "1";
    effectColor[0] = "0.25 0.25 0.25 1";
    effectColor[1] = "0.25 0.25 0.25 0";
-   diffuseMap = "art/terrains/Example/rocktest";
-   diffuseSize = "400";
-   normalMap = "art/terrains/Example/rocktest_n";
-   detailMap = "art/terrains/Example/rocktest_d";
-   detailSize = "10";
-   detailDistance = "100";
-   internalName = "rocktest";
-   isManaged = "1";
-   detailBrightness = "1";
-   enabled = "1";
 };
 
 new TerrainMaterial()
@@ -190,16 +168,6 @@ singleton Material(TerrainFX_stone)
    impactSoundId = "1";
    effectColor[0] = "0.25 0.25 0.25 1";
    effectColor[1] = "0.25 0.25 0.25 0";
-   diffuseMap = "art/terrains/Example/stone";
-   diffuseSize = "400";
-   normalMap = "art/terrains/Example/stone_n";
-   detailMap = "art/terrains/Example/stone_d";
-   detailSize = "10";
-   detailDistance = "100";
-   internalName = "stone";
-   isManaged = "1";
-   detailBrightness = "1";
-   enabled = "1";
 };
 
 new TerrainMaterial()
@@ -243,5 +211,4 @@ new TerrainMaterial()
    detailBrightness = "1";
    Enabled = "1";
    diffuseSize = "200";
-   normalMap = "art/terrains/Example/sand_n";
 };

+ 5 - 51
Templates/Full/game/tools/worldEditor/gui/TerrainPainterToolbar.ed.gui

@@ -210,7 +210,7 @@
       new GuiBitmapCtrl() {
          Enabled = "1";
          Profile = "ToolsGuiDefaultProfile";
-         position = "250 3";
+         position = "270 3";
          Extent = "2 26";
          MinExtent = "1 1";
          bitmap = "tools/gui/images/separator-h.png";
@@ -222,7 +222,7 @@
          Profile = "ToolsGuiDefaultProfile";
          HorizSizing = "right";
          VertSizing = "bottom";
-         Position = "242 5";
+         Position = "262 5";
          Extent = "256 50";
          MinExtent = "8 2";
          canSave = "1";
@@ -370,7 +370,7 @@
       new GuiBitmapCtrl() {
          Enabled = "1";
          Profile = "ToolsGuiDefaultProfile";
-         position = "495 3";
+         position = "525 3";
          Extent = "2 26";
          MinExtent = "1 1";
          bitmap = "tools/gui/images/separator-h.png";
@@ -382,7 +382,7 @@
          Profile = "ToolsGuiTransparentProfile";
          HorizSizing = "right";
          VertSizing = "bottom";
-         position = "510 5";
+         position = "540 5";
          Extent = "120 50";
          MinExtent = "8 2";
          canSave = "1";
@@ -454,53 +454,6 @@
             bitmap = "tools/gui/images/dropslider";
          }; 
       };
-	  
-      new GuiBitmapCtrl() {
-         Enabled = "1";
-         Profile = "ToolsGuiDefaultProfile";
-         position = "618 3";
-         Extent = "2 26";
-         MinExtent = "1 1";
-         bitmap = "tools/gui/images/separator-h.png";
-      };
-	  
-      new GuiControl(LerpBlendCheckButtonContainer,EditorGuiGroup) {
-            position = "628 5";
-            extent = "70 50";
-            minExtent = "8 2";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "ToolsGuiTransparentProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "1";
-            canSave = "1";
-            canSaveDynamicFields = "0";
-
-            new GuiCheckBoxCtrl() {
-               text = " LerpBlend";
-               groupNum = "-1";
-               buttonType = "ToggleButton";
-               useMouseEvents = "0";
-               position = "0 2";
-               extent = "140 18";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiCheckBoxProfile";
-               visible = "1";
-               active = "1";
-               command = "ETerrainEditor.toggleBlendType($ThisControl);";
-               tooltipProfile = "GuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "0";
-               internalName = "LerpBlendCheckBox";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-         };
    };
 };
 //--- OBJECT WRITE END ---
@@ -681,3 +634,4 @@ new GuiMouseEventCtrl(PaintBrushSoftnessSliderCtrlContainer,EditorGuiGroup) {
       value = "0";
    };
 };
+

+ 10 - 82
Templates/Full/game/tools/worldEditor/gui/guiTerrainMaterialDlg.ed.gui

@@ -20,8 +20,8 @@
       HorizSizing = "center";
       VertSizing = "center";
       position = "221 151";
-      Extent = "394 452";
-      MinExtent = "358 452";
+      Extent = "394 432";
+      MinExtent = "358 432";
       canSave = "1";
       Visible = "1";
       tooltipprofile = "ToolsGuiToolTipProfile";
@@ -106,7 +106,7 @@
          HorizSizing = "left";
          VertSizing = "height";
          position = "202 26";
-         Extent = "185 383";
+         Extent = "185 363";
          MinExtent = "8 2";
          canSave = "1";
          Visible = "1";
@@ -439,7 +439,7 @@
             HorizSizing = "width";
             VertSizing = "bottom";
             position = "6 295";
-            Extent = "185 80";
+            Extent = "185 50";
             MinExtent = "8 2";
             canSave = "1";
             Visible = "1";
@@ -621,78 +621,6 @@
                sinkAllKeyEvents = "0";
                passwordMask = "*";
             };
-            new GuiSliderCtrl(TerrainMaterialDlgBlendDepthSlider) {
-               range = "0.01 0.99";
-               ticks = "0";
-               snap = "0";
-               value = "0.5";
-               position = "39 61";
-               extent = "70 14";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiSliderProfile";
-               visible = "1";
-               active = "1";
-               tooltipProfile = "GuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "0";
-               internalName = "blendDepthSliderCtrl";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-            new GuiTextCtrl() {
-               text = "Blend Depth";
-               maxLength = "1024";
-               margin = "0 0 0 0";
-               padding = "0 0 0 0";
-               anchorTop = "1";
-               anchorBottom = "0";
-               anchorLeft = "1";
-               anchorRight = "0";
-               position = "115 61";
-               extent = "58 15";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "GuiTextProfile";
-               visible = "1";
-               active = "1";
-               tooltipProfile = "GuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "1";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
-            new GuiTextEditCtrl(TerrainMaterialDlgBlendDepthTextEdit) {
-               historySize = "0";
-               tabComplete = "0";
-               sinkAllKeyEvents = "0";
-               password = "0";
-               passwordMask = "*";
-               text = "0.3";
-               maxLength = "1024";
-               margin = "0 0 0 0";
-               padding = "0 0 0 0";
-               anchorTop = "0";
-               anchorBottom = "0";
-               anchorLeft = "0";
-               anchorRight = "0";
-               position = "1 59";
-               extent = "35 18";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "ToolsGuiTextEditProfile";
-               visible = "1";
-               active = "1";
-               tooltipProfile = "ToolsGuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "0";
-               internalName = "blendDepthTextEditCtrl";
-               canSave = "1";
-               canSaveDynamicFields = "0";
-            };
          };
 
          new GuiBitmapCtrl() {
@@ -1332,7 +1260,7 @@
          HorizSizing = "width";
          VertSizing = "height";
          position = "6 42";
-         Extent = "189 393";
+         Extent = "189 373";
          MinExtent = "8 2";
          canSave = "1";
          Visible = "1";
@@ -1346,7 +1274,7 @@
             HorizSizing = "width";
             VertSizing = "height";
             position = "0 0";
-            Extent = "189 394";
+            Extent = "189 374";
             MinExtent = "8 2";
             canSave = "1";
             Visible = "1";
@@ -1405,7 +1333,7 @@
          Profile = "ToolsGuiButtonProfile";
          HorizSizing = "left";
          VertSizing = "top";
-         position = "202 414";
+         position = "202 394";
          Extent = "98 22";
          MinExtent = "8 2";
          canSave = "1";
@@ -1424,7 +1352,7 @@
          Profile = "ToolsGuiButtonProfile";
          HorizSizing = "left";
          VertSizing = "top";
-         position = "307 414";
+         position = "307 394";
          Extent = "80 22";
          MinExtent = "8 2";
          canSave = "1";
@@ -1444,7 +1372,7 @@
          HorizSizing = "left";
          VertSizing = "height";
          position = "199 23";
-         Extent = "190 287";
+         Extent = "190 267";
          isContainer = true;
          Visible = false;
          bitmap = "tools/gui/images/inactive-overlay";
@@ -1461,4 +1389,4 @@
       };
    };
 };
-//--- OBJECT WRITE END ---
+//--- OBJECT WRITE END ---

+ 0 - 7
Templates/Full/game/tools/worldEditor/scripts/editors/terrainEditor.ed.cs

@@ -222,8 +222,6 @@ function EPainter::setup( %this, %matIndex )
    ETerrainEditor.setAction( ETerrainEditor.currentAction );
    EditorGuiStatusBar.setInfo(ETerrainEditor.currentActionDesc);
    ETerrainEditor.renderVertexSelection = true;
-   
-   EWTerrainPainterToolbar-->LerpBlendCheckBox.setValue($Pref::Terrain::LerpBlend);
 }
 
 function onNeedRelight()
@@ -259,11 +257,6 @@ function TerrainEditor::toggleBrushType( %this, %brush )
    %this.setBrushType( %brush.internalName );
 }
 
-function TerrainEditor::toggleBlendType( %this, %check )
-{
-   $Pref::Terrain::LerpBlend = %check.getValue();
-}
-
 function TerrainEditor::offsetBrush(%this, %x, %y)
 {
    %curPos = %this.getBrushPos();

+ 1 - 23
Templates/Full/game/tools/worldEditor/scripts/interfaces/terrainMaterialDlg.ed.cs

@@ -401,9 +401,6 @@ function TerrainMaterialDlg::setActiveMaterial( %this, %mat )
       %this-->detDistanceCtrl.setText( %mat.detailDistance );      
       %this-->sideProjectionCtrl.setValue( %mat.useSideProjection );
       %this-->parallaxScaleCtrl.setText( %mat.parallaxScale );
-      %blendDepth = mFloor(%mat.blendDepth * 1000)/1000;
-      %this-->blendDepthTextEditCtrl.setText( %blendDepth );
-      %this-->blendDepthSliderCtrl.setValue( %mat.blendDepth );
 
       %this-->macroSizeCtrl.setText( %mat.macroSize );
       %this-->macroStrengthCtrl.setText( %mat.macroStrength );
@@ -457,7 +454,6 @@ function TerrainMaterialDlg::saveDirtyMaterial( %this, %mat )
    %detailDistance = %this-->detDistanceCtrl.getText();   
    %useSideProjection = %this-->sideProjectionCtrl.getValue();   
    %parallaxScale = %this-->parallaxScaleCtrl.getText();
-   %blendDepth = %this-->blendDepthTextEditCtrl.getText();
 
    %macroSize = %this-->macroSizeCtrl.getText();      
    %macroStrength = %this-->macroStrengthCtrl.getText();
@@ -479,8 +475,7 @@ function TerrainMaterialDlg::saveDirtyMaterial( %this, %mat )
          %mat.macroSize == %macroSize &&
          %mat.macroStrength == %macroStrength &&
          %mat.macroDistance == %macroDistance &&         
-         %mat.parallaxScale == %parallaxScale &&
-         %mat.blendDepth == %blendDepth)               
+         %mat.parallaxScale == %parallaxScale )               
       return;
       
    // Make sure the material name is unique.
@@ -514,7 +509,6 @@ function TerrainMaterialDlg::saveDirtyMaterial( %this, %mat )
    %mat.macroDistance = %macroDistance;    
    %mat.useSideProjection = %useSideProjection;
    %mat.parallaxScale = %parallaxScale;
-   %mat.blendDepth = %blendDepth;
    
    // Mark the material as dirty and needing saving.
    
@@ -560,7 +554,6 @@ function TerrainMaterialDlg::snapshotMaterials( %this )
          macroDistance = %mat.macroDistance;
          useSideProjection = %mat.useSideProjection;
          parallaxScale = %mat.parallaxScale;
-         blendDepth = %mat.blendDepth;
       };
    }
 }
@@ -595,7 +588,6 @@ function TerrainMaterialDlg::restoreMaterials( %this )
       %mat.macroDistance = %obj.macroDistance;
       %mat.useSideProjection = %obj.useSideProjection;
       %mat.parallaxScale = %obj.parallaxScale;
-      %mat.blendDepth = %obj.blendDepth;
    }
 }
 
@@ -631,17 +623,3 @@ function TerrainMaterialDlg::_selectTextureFileDialog( %this, %defaultFileName )
       
    return %file;
 }
-
-function TerrainMaterialDlgBlendDepthSlider::onMouseDragged(%this)
-{
-   %value = mFloor(%this.value * 1000)/1000;
-   TerrainMaterialDlgBlendDepthTextEdit.setText(%value);
-   TerrainMaterialDlg.activeMat.blendDepth = %this.value;
-   
-}
-
-function TerrainMaterialDlgBlendDepthTextEdit::onValidate(%this)
-{
-   TerrainMaterialDlgBlendDepthSlider.setValue(%this.getText());
-   TerrainMaterialDlg.activeMat.blendDepth = %this.getText();
-}