Skip to content

Commit

Permalink
Add ifdef for UE 5.4 in point cloud shader
Browse files Browse the repository at this point in the history
  • Loading branch information
j9liu committed Nov 25, 2024
1 parent ab1a5bf commit ecb5f2b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Shaders/Private/CesiumPointAttenuationVertexFactory.ush
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ecb5f2b

Please sign in to comment.