diff --git a/Engine/source/materials/materialList.cpp b/Engine/source/materials/materialList.cpp index e2352321b..34dd104f3 100644 --- a/Engine/source/materials/materialList.cpp +++ b/Engine/source/materials/materialList.cpp @@ -365,7 +365,7 @@ void MaterialList::mapMaterial( U32 i ) newMat->mAutoGenerated = true; // Overwrite diffuseMap in new material - newMat->mDiffuseMapName[0] = texHandle->mTextureLookupName; + newMat->_setDiffuseMap(texHandle->mTextureLookupName,0); // Set up some defaults for transparent textures if (texHandle->mHasTransparency) diff --git a/Engine/source/materials/processedMaterial.cpp b/Engine/source/materials/processedMaterial.cpp index 452b95edc..63150fd94 100644 --- a/Engine/source/materials/processedMaterial.cpp +++ b/Engine/source/materials/processedMaterial.cpp @@ -421,7 +421,7 @@ void ProcessedMaterial::_setStageData() //If we start with a #, we're probably actually attempting to hit a named target and it may not get a hit on the first pass. So we'll //pass on the error rather than spamming the console if (!String(mMaterial->mDiffuseMapName[i]).startsWith("#")) - mMaterial->logError("Failed to load diffuse map %s for stage %i", _getTexturePath(mMaterial->mDiffuseMapName[i]).c_str(), i); + mMaterial->logError("Failed to load diffuse map %s for stage %i", mMaterial->mDiffuseMapName[i], i); // Load a debug texture to make it clear to the user // that the texture for this stage was missing. diff --git a/Engine/source/shaderGen/GLSL/shaderFeatureGLSL.cpp b/Engine/source/shaderGen/GLSL/shaderFeatureGLSL.cpp index 21755d80c..b6c825864 100644 --- a/Engine/source/shaderGen/GLSL/shaderFeatureGLSL.cpp +++ b/Engine/source/shaderGen/GLSL/shaderFeatureGLSL.cpp @@ -2067,6 +2067,7 @@ RTLightingFeatGLSL::RTLightingFeatGLSL() void RTLightingFeatGLSL::processVert( Vector &componentList, const MaterialFeatureData &fd ) { + if (fd.features[MFT_ImposterVert]) return; MultiLine *meta = new MultiLine; ShaderConnector *connectComp = dynamic_cast( componentList[C_CONNECTOR] ); diff --git a/Engine/source/shaderGen/HLSL/shaderFeatureHLSL.cpp b/Engine/source/shaderGen/HLSL/shaderFeatureHLSL.cpp index 72252177a..bf826fea9 100644 --- a/Engine/source/shaderGen/HLSL/shaderFeatureHLSL.cpp +++ b/Engine/source/shaderGen/HLSL/shaderFeatureHLSL.cpp @@ -2138,10 +2138,11 @@ RTLightingFeatHLSL::RTLightingFeatHLSL() void RTLightingFeatHLSL::processVert( Vector &componentList, const MaterialFeatureData &fd ) { + if (fd.features[MFT_ImposterVert]) return; + MultiLine *meta = new MultiLine; ShaderConnector *connectComp = dynamic_cast( componentList[C_CONNECTOR] ); - getOutWorldToTangent(componentList, meta, fd); // Special case for lighting imposters. We dont have a vert normal and may not // have a normal map. Generate and pass the normal data the pixel shader needs. @@ -2206,6 +2207,7 @@ void RTLightingFeatHLSL::processVert( Vector &componentList, } addOutWsPosition( componentList, fd.features[MFT_UseInstancing], meta ); + getOutWorldToTangent(componentList, meta, fd); output = meta; } @@ -3025,14 +3027,13 @@ void ReflectionProbeFeatHLSL::processVert(Vector& componentLis output = meta; // Also output the worldToTanget transform which // we use to create the world space normal. - getOutWorldToTangent(componentList, meta, fd); + //getOutWorldToTangent(componentList, meta, fd); } void ReflectionProbeFeatHLSL::processPix(Vector &componentList, const MaterialFeatureData &fd) { - // Skip out on realtime lighting if we don't have a normal - // or we're doing some sort of baked lighting. + // Skip out on realtime lighting if we're doing some sort of baked lighting. // // TODO: We can totally detect for this in the material // feature setup... we should move it out of here! diff --git a/Engine/source/terrain/terrData.cpp b/Engine/source/terrain/terrData.cpp index bc2121bef..a80e350f0 100644 --- a/Engine/source/terrain/terrData.cpp +++ b/Engine/source/terrain/terrData.cpp @@ -1419,7 +1419,6 @@ void TerrainBlock::unpackUpdate(NetConnection* con, BitStream *stream) char buffer[256]; stream->readString(buffer); bool validAsset = setTerrainAsset(StringTable->insert(buffer)); - _updateBaseTexture(NONE); } if (baseTexSizeChanged && isProperlyAdded()) _updateBaseTexture(NONE); diff --git a/Engine/source/terrain/terrMaterial.cpp b/Engine/source/terrain/terrMaterial.cpp index 84dc0d9de..06b3b27bd 100644 --- a/Engine/source/terrain/terrMaterial.cpp +++ b/Engine/source/terrain/terrMaterial.cpp @@ -168,7 +168,7 @@ TerrainMaterial* TerrainMaterial::findOrCreate( const char *nameOrPath ) { mat = new TerrainMaterial(); mat->setInternalName( nameOrPath ); - mat->mDiffuseMapName = nameOrPath; + mat->_setDiffuseMap(nameOrPath); mat->registerObject(); Sim::getRootGroup()->addObject( mat ); return mat; @@ -183,11 +183,11 @@ TerrainMaterial* TerrainMaterial::findOrCreate( const char *nameOrPath ) // fallback here just in case it gets "lost". mat = new TerrainMaterial(); mat->setInternalName( "warning_material" ); - mat->mDiffuseMapName = GFXTextureManager::getWarningTexturePath(); + mat->_setDiffuseMap(GFXTextureManager::getWarningTexturePath()); mat->mDiffuseSize = 500; - mat->mDiffuseMapName = GFXTextureManager::getWarningTexturePath(); + mat->_setDetailMap(StringTable->EmptyString()); mat->mDetailSize = 5; - mat->mDiffuseMapName = GFXTextureManager::getWarningTexturePath(); + mat->_setMacroMap(StringTable->EmptyString()); mat->mMacroSize = 200; mat->registerObject(); diff --git a/Engine/source/ts/tsLastDetail.cpp b/Engine/source/ts/tsLastDetail.cpp index 228d506ec..9af2c22fa 100644 --- a/Engine/source/ts/tsLastDetail.cpp +++ b/Engine/source/ts/tsLastDetail.cpp @@ -218,8 +218,8 @@ void TSLastDetail::update( bool forceUpdate ) // Setup the material for this imposter. mMaterial = MATMGR->allocateAndRegister( String::EmptyString ); mMaterial->mAutoGenerated = true; - mMaterial->mDiffuseMapName[0] = diffuseMapPath; - mMaterial->mNormalMapName[0] = _getNormalMapPath(); + mMaterial->_setDiffuseMap(diffuseMapPath,0); + mMaterial->_setNormalMap(_getNormalMapPath(), 0); mMaterial->mImposterLimits.set( (mNumPolarSteps * 2) + 1, mNumEquatorSteps, mPolarAngle, mIncludePoles ); mMaterial->mTranslucent = true; mMaterial->mTranslucentBlendOp = Material::None; diff --git a/Templates/BaseGame/game/core/rendering/materials/Blank_sky/BlankSkybox.png b/Templates/BaseGame/game/core/rendering/materials/Blank_sky/BlankSkybox.png index 69b986833..9a60da1a2 100644 Binary files a/Templates/BaseGame/game/core/rendering/materials/Blank_sky/BlankSkybox.png and b/Templates/BaseGame/game/core/rendering/materials/Blank_sky/BlankSkybox.png differ diff --git a/Templates/BaseGame/game/tools/projectImporter/scripts/pre40/T3Dpre4ProjectImporter.tscript b/Templates/BaseGame/game/tools/projectImporter/scripts/pre40/T3Dpre4ProjectImporter.tscript index c762d3a11..ad44a398d 100644 --- a/Templates/BaseGame/game/tools/projectImporter/scripts/pre40/T3Dpre4ProjectImporter.tscript +++ b/Templates/BaseGame/game/tools/projectImporter/scripts/pre40/T3Dpre4ProjectImporter.tscript @@ -805,7 +805,9 @@ T3Dpre4ProjectImporter::genProcessor("GroundCover", "material materialAsset shap T3Dpre4ProjectImporter::genProcessor("GroundPlane", "material materialAsset"); T3Dpre4ProjectImporter::genProcessor("LevelInfo", "accuTexture accuTextureAsset"); T3Dpre4ProjectImporter::genProcessor("TSStatic", "shape shapeAsset shapeName shapeAsset"); -T3Dpre4ProjectImporter::genProcessor("TSForestItemData", "shape shapeAsset shapeName shapeAsset"); +T3Dpre4ProjectImporter::genProcessor("ForestItemData", "shape shapeAsset shapeName shapeAsset"); +//T3Dpre4ProjectImporter::genProcessor("TerrainBlock", "terrainFile terrainFileAsset"); + //============================================================================== // Levels //============================================================================== diff --git a/Templates/BaseGame/game/tools/projectImporter/scripts/projectImporter.tscript b/Templates/BaseGame/game/tools/projectImporter/scripts/projectImporter.tscript index ef465b989..bda65b92e 100644 --- a/Templates/BaseGame/game/tools/projectImporter/scripts/projectImporter.tscript +++ b/Templates/BaseGame/game/tools/projectImporter/scripts/projectImporter.tscript @@ -465,14 +465,11 @@ function processLegacyField(%line, %originalFieldName, %newFieldName) if(%assetId !$= "" && AssetDatabase.isDeclaredAsset(%assetId)) { - //if (%assetId.getStatusString() $= "Ok") %outLine = strReplace(%outLine, %value, %assetId); - //else - // error("Asset assignment failure:", %assetId, getStatusString()); } } - if(%outLine !$= %line) + if((%outLine !$= %line)&&(%assetId.getStatusString() !$= "BadFileReference")&&(%assetId.getStatusString() !$= "Failed")) { echo("Legacy Project Importer - processing of legacy line: " @ %line @ " has been updated to: " @ %outLine); return %outLine;