diff --git a/Shaders/Private/CesiumPointAttenuationVertexFactory.ush b/Shaders/Private/CesiumPointAttenuationVertexFactory.ush index 57ed480d5..6746ed36c 100644 --- a/Shaders/Private/CesiumPointAttenuationVertexFactory.ush +++ b/Shaders/Private/CesiumPointAttenuationVertexFactory.ush @@ -4,6 +4,10 @@ CesiumPointAttenuationVertexFactory.ush: point attenuation vertex factory shader code. =============================================================================*/ +#ifndef ENGINE_VERSION_5_4_OR_HIGHER +#define ENGINE_VERSION_5_5_OR_HIGHER 0 +#endif + #ifndef ENGINE_VERSION_5_5_OR_HIGHER #define ENGINE_VERSION_5_5_OR_HIGHER 0 #endif @@ -385,8 +389,10 @@ FMaterialVertexParameters GetMaterialVertexParameters( Result.TexCoords[CoordinateIndex] = TexCoordBuffer[NumTexCoords * Intermediates.PointIndex + ClampedCoordinateIndex]; } #endif - + +#if ENGINE_VERSION_5_4_OR_HIGHER Result.LWCData = MakeMaterialLWCData(Result); +#endif return Result; } diff --git a/Source/CesiumRuntime/Private/CesiumPointAttenuationVertexFactory.cpp b/Source/CesiumRuntime/Private/CesiumPointAttenuationVertexFactory.cpp index f62abe9f3..3e887424d 100644 --- a/Source/CesiumRuntime/Private/CesiumPointAttenuationVertexFactory.cpp +++ b/Source/CesiumRuntime/Private/CesiumPointAttenuationVertexFactory.cpp @@ -175,6 +175,10 @@ void FCesiumPointAttenuationVertexFactory::ModifyCompilationEnvironment( const FVertexFactoryShaderPermutationParameters& Parameters, FShaderCompilerEnvironment& OutEnvironment) { FLocalVertexFactory::ModifyCompilationEnvironment(Parameters, OutEnvironment); +#if ENGINE_VERSION_5_4_OR_HIGHER + OutEnvironment.SetDefine(TEXT("ENGINE_VERSION_5_4_OR_HIGHER"), TEXT("1")); +#endif + #if ENGINE_VERSION_5_5_OR_HIGHER OutEnvironment.SetDefine(TEXT("ENGINE_VERSION_5_5_OR_HIGHER"), TEXT("1")); #endif