You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Fixed grass maps not being able to detect that the grass map material is finished compiling
#rb arciel.rekman, ben.ingram, jason.nadro #ROBOMERGE-AUTHOR: jonathan.bard #ROBOMERGE-SOURCE: CL 17747180 via CL 17747314 via CL 17747321 via CL 17747324 #ROBOMERGE-BOT: STARSHIP (Release-5.0 -> Release-Engine-Staging) (v879-17706426) [CL 17747327 by jonathan bard in ue5-release-engine-staging branch]
This commit is contained in:
@@ -975,7 +975,20 @@ bool ULandscapeComponent::CanRenderGrassMap() const
|
||||
FMaterialResource* MaterialResource = MaterialInstance != nullptr ? MaterialInstance->GetMaterialResource(ComponentWorld->FeatureLevel) : nullptr;
|
||||
|
||||
// Check we can render the material
|
||||
if (MaterialResource == nullptr || !MaterialResource->HasValidGameThreadShaderMap())
|
||||
if (MaterialResource == nullptr)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// We only need the GrassWeight shaders on the fixed grid vertex factory to render grass maps :
|
||||
FMaterialShaderTypes ShaderTypes;
|
||||
ShaderTypes.AddShaderType<FLandscapeGrassWeightVS>();
|
||||
ShaderTypes.AddShaderType<FLandscapeGrassWeightPS>();
|
||||
|
||||
FVertexFactoryType* LandscapeGrassVF = FindVertexFactoryType(FName(TEXT("FLandscapeFixedGridVertexFactory"), FNAME_Find));
|
||||
|
||||
FMaterialShaders Shaders;
|
||||
if (!MaterialResource->TryGetShaders(ShaderTypes, LandscapeGrassVF, Shaders))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user