From dd200e1d796f3711b24b48b5868ac3add719c6f5 Mon Sep 17 00:00:00 2001 From: PopcornFX Bot Date: Thu, 28 Sep 2023 16:35:36 +0200 Subject: [PATCH] PopcornFX Plugin v2.17.5 --- .github/workflows/draft-release.yml | 2 +- Download_SDK_Desktop.bat | 2 +- Download_SDK_Mobile.bat | 2 +- PopcornFX.uplugin | 4 +-- README.md | 4 +-- Shaders/Private/PopcornFXVertexFactory.ush | 23 +++--------- .../Private/Assets/PopcornFXFile.cpp | 4 +-- .../Assets/PopcornFXRendererMaterial.cpp | 6 ++-- .../PopcornFXAttributeSamplerSkinnedMesh.cpp | 20 +++++------ .../Attributes/PopcornFXAttributeSamplers.cpp | 1 + .../PopcornFXDependencyModuleLevelEditor.cpp | 36 +++++++++---------- .../PopcornFXDetailsAttributeList.cpp | 36 +++++++++---------- .../Private/Editor/EditorHelpers.cpp | 4 +-- .../Private/Editor/PopcornFXEffectEditor.cpp | 4 +-- .../PopcornFXCustomizationAssetDep.cpp | 20 +++++------ ...PopcornFXCustomizationRendererMaterial.cpp | 4 +-- ...cornFXCustomizationSubRendererMaterial.cpp | 8 ++--- .../Private/GPUSim/PopcornFXGPUSim_D3D11.cpp | 5 ++- .../Private/GPUSim/PopcornFXGPUSim_D3D12.cpp | 4 +-- .../GPUSim/PopcornFXSortComputeShader.cpp | 14 ++++---- .../Private/Internal/ParticleScene.cpp | 20 +++++------ .../Private/Internal/ParticleScene.h | 8 ++--- .../Private/Platforms/PopcornFXPlatform.h | 4 +-- .../Platforms/PopcornFXPlatformCommon.cpp | 4 +-- Source/PopcornFX/Private/PopcornFXSDK.h | 3 -- .../Render/BatchDrawer_Billboard_CPU.cpp | 4 +-- .../Render/BatchDrawer_Billboard_GPU.cpp | 4 +-- .../Private/Render/BatchDrawer_Light.cpp | 4 +-- .../Private/Render/BatchDrawer_Ribbon_CPU.cpp | 14 ++------ .../Private/Render/BatchDrawer_Ribbon_CPU.h | 2 -- .../Render/BatchDrawer_SkeletalMesh_CPU.cpp | 10 +++--- .../Render/BatchDrawer_Triangle_CPU.cpp | 4 +-- .../Private/Render/PopcornFXVertexFactory.h | 2 -- .../Public/PopcornFXVersionGenerated.h | 4 +-- .../Nodes/PopcornFXNode_DynamicField.cpp | 4 +-- .../Private/PopcornFXEmitterFactory.cpp | 4 +-- .../Private/PopcornFXFileFactory.cpp | 4 +-- .../Private/PopcornFXFileReimportFactory.cpp | 4 +-- 38 files changed, 141 insertions(+), 165 deletions(-) diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml index 4720945..77199de 100644 --- a/.github/workflows/draft-release.yml +++ b/.github/workflows/draft-release.yml @@ -25,6 +25,6 @@ jobs: with: draft: true name: "Unreal Engine Plugin: ${{ github.ref_name }}" - body: "PopcornFX Plugin ${{ github.ref_name }} for Unreal Engine\n + body: "PopcornFX Plugin ${{ github.ref_name }} for Unreal Engine\n\n You can download the PopcornFX Editor and find the full changelog here:\n https://wiki.popcornfx.com/index.php?title=PK-Editor_${{ env.MINOR_VERSION }}#Changelog_${{ env.VERSION }}" \ No newline at end of file diff --git a/Download_SDK_Desktop.bat b/Download_SDK_Desktop.bat index 3d04272..386ab3a 100644 --- a/Download_SDK_Desktop.bat +++ b/Download_SDK_Desktop.bat @@ -6,7 +6,7 @@ setlocal bitsadmin /reset bitsadmin /create third_party_download_desktop -bitsadmin /addfile third_party_download_desktop https://downloads.popcornfx.com/Plugins/UE4/UnrealEngine_PopcornFXPlugin_2.18.0_Win64_Linux64_Mac64.7z "%~dp0\_PopcornFX_Runtime_SDK_Desktop.7z" +bitsadmin /addfile third_party_download_desktop https://downloads.popcornfx.com/Plugins/UE4/UnrealEngine_PopcornFXPlugin_2.17.5_Win64_Linux64_Mac64.7z "%~dp0\_PopcornFX_Runtime_SDK_Desktop.7z" bitsadmin /setpriority third_party_download_desktop "FOREGROUND" bitsadmin /resume third_party_download_desktop diff --git a/Download_SDK_Mobile.bat b/Download_SDK_Mobile.bat index 069f300..bcd7a74 100644 --- a/Download_SDK_Mobile.bat +++ b/Download_SDK_Mobile.bat @@ -6,7 +6,7 @@ setlocal bitsadmin /reset bitsadmin /create third_party_download_mobile -bitsadmin /addfile third_party_download_mobile https://downloads.popcornfx.com/Plugins/UE4/UnrealEngine_PopcornFXPlugin_2.18.0_iOS_Android.7z "%~dp0\_PopcornFX_Runtime_SDK_Mobile.7z" +bitsadmin /addfile third_party_download_mobile https://downloads.popcornfx.com/Plugins/UE4/UnrealEngine_PopcornFXPlugin_2.17.5_iOS_Android.7z "%~dp0\_PopcornFX_Runtime_SDK_Mobile.7z" bitsadmin /setpriority third_party_download_mobile "FOREGROUND" bitsadmin /resume third_party_download_mobile diff --git a/PopcornFX.uplugin b/PopcornFX.uplugin index 9dcea29..b2e8c5d 100644 --- a/PopcornFX.uplugin +++ b/PopcornFX.uplugin @@ -1,7 +1,7 @@ { "FileVersion": 3, - "Version": 21800, - "VersionName": "2.18.0", + "Version": 21705, + "VersionName": "2.17.5", "FriendlyName": "PopcornFX", "Description": "PopcornFX Realtime Particle Solution integration into Unreal Engine", "Category": "PopcornFX", diff --git a/README.md b/README.md index eb3ef58..46504b0 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # Unreal Engine PopcornFX Plugin Integrates the **PopcornFX Runtime SDK** into **Unreal Engine 4** and **Unreal Engine 5** as a Plugin. -* **Version:** `v2.18.0` -* **Unreal Engine:** `4.27`, `5.1`, `5.2` and `5.3` +* **Version:** `v2.17.5` +* **Unreal Engine:** `4.27`, `5.0`, `5.1`, `5.2` and `5.3` * **Supported platforms:** `Windows`, `MacOS`, `Linux`, `iOS`, `Android`, `PS4`, `PS5`, `XboxOne`, `Xbox Series`, `Switch` [Contact-us](http://www.popcornfx.com/contact-us/) to request access to the plugin for consoles. diff --git a/Shaders/Private/PopcornFXVertexFactory.ush b/Shaders/Private/PopcornFXVertexFactory.ush index eeb1c1e..878fe9b 100644 --- a/Shaders/Private/PopcornFXVertexFactory.ush +++ b/Shaders/Private/PopcornFXVertexFactory.ush @@ -265,10 +265,8 @@ FVertexFactoryIntermediates GetVertexFactoryIntermediates(FVertexFactoryInput In Intermediates.SceneData = VF_GPUSCENE_GET_INTERMEDIATES(Input); #endif // (ENGINE_MAJOR_VERSION == 5) - uint particleID = 0; - const int vertexID = Input.VertexId; - const int vpp = PopcornFXBillboardVSUniforms.VPP; // Note: if tube/multiplane with differing vertex count end up being batched, this won't work. - const int vppHalf = vpp / 2 - 1; + uint vertexID = Input.VertexId; + uint particleID = 0; switch (PopcornFXBillboardVSUniforms.RendererType) { case Renderer_Billboard: @@ -281,20 +279,9 @@ FVertexFactoryIntermediates GetVertexFactoryIntermediates(FVertexFactoryInput In } case Renderer_Ribbon: { - if (vertexID < PopcornFXBillboardVSUniforms.TubesPlanesOffset * 4) // No tube/multiplane batching yet with quad bb modes, but this might come. - { - // First two vertices within a quad: grab the current particle, last two: grab the next one - // Clamps to the total particle count to avoid overflowing the GPU sim buffers - particleID = min(vertexID / 4 + saturate(vertexID % 4 - 1), PopcornFXBillboardVSUniforms.TotalParticleCount - 1); - } - else - { - // First n (n being segmentCount/planeCount + 1) vertices: grab the current particle, last n: grab the next one - // Clamps to the total particle count to avoid overflowing the GPU sim buffers - particleID = min(PopcornFXBillboardVSUniforms.TubesPlanesOffset + (vertexID - (PopcornFXBillboardVSUniforms.TubesPlanesOffset * 4)) / vpp + - saturate(vertexID % vpp - vppHalf), - PopcornFXBillboardVSUniforms.TotalParticleCount - 1); - } + // First two vertices within a quad: grab the current particle, last two: grab the next one + // Clamps to the total particle count to avoid overflowing the GPU sim buffers + particleID = min(vertexID / 4 + saturate((int)vertexID % 4 - 1), PopcornFXBillboardVSUniforms.TotalParticleCount - 1); break; } case Renderer_Triangle: diff --git a/Source/PopcornFX/Private/Assets/PopcornFXFile.cpp b/Source/PopcornFX/Private/Assets/PopcornFXFile.cpp index b608621..04bfff4 100644 --- a/Source/PopcornFX/Private/Assets/PopcornFXFile.cpp +++ b/Source/PopcornFX/Private/Assets/PopcornFXFile.cpp @@ -17,11 +17,11 @@ #include "UObject/LinkerLoad.h" #if WITH_EDITOR # include "Factories/TextureFactory.h" -# if (ENGINE_MAJOR_VERSION == 5) +# if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) # include "AssetRegistry/AssetRegistryModule.h" # else # include "AssetRegistryModule.h" -# endif // (ENGINE_MAJOR_VERSION == 5) +# endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) # include "EditorReimportHandler.h" #endif // WITH_EDITOR diff --git a/Source/PopcornFX/Private/Assets/PopcornFXRendererMaterial.cpp b/Source/PopcornFX/Private/Assets/PopcornFXRendererMaterial.cpp index 23364fe..2d64073 100644 --- a/Source/PopcornFX/Private/Assets/PopcornFXRendererMaterial.cpp +++ b/Source/PopcornFX/Private/Assets/PopcornFXRendererMaterial.cpp @@ -15,7 +15,7 @@ #include "Engine/Texture2D.h" #include "Engine/StaticMesh.h" #include "Engine/SkeletalMesh.h" -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5) && (ENGINE_MINOR_VERSION >= 1) # include "Engine/SkinnedAssetCommon.h" #endif #include "MaterialShared.h" @@ -90,7 +90,7 @@ namespace for (int32 i = 0; i < params.StaticSwitchParameters.Num(); ++i) { FStaticSwitchParameter ¶m = params.StaticSwitchParameters[i]; -#elif (ENGINE_MAJOR_VERSION == 5) +#elif (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION == 1) for (int32 i = 0; i < params.EditorOnly.StaticSwitchParameters.Num(); ++i) { FStaticSwitchParameter ¶m = params.EditorOnly.StaticSwitchParameters[i]; @@ -98,7 +98,7 @@ namespace for (int32 i = 0; i < params.StaticSwitchParameters.Num(); ++i) { FStaticSwitchParameter ¶m = params.StaticSwitchParameters[i]; -#endif +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) if (param.ParameterInfo.Name == name) { diff --git a/Source/PopcornFX/Private/Attributes/PopcornFXAttributeSamplerSkinnedMesh.cpp b/Source/PopcornFX/Private/Attributes/PopcornFXAttributeSamplerSkinnedMesh.cpp index 09728f2..515de11 100644 --- a/Source/PopcornFX/Private/Attributes/PopcornFXAttributeSamplerSkinnedMesh.cpp +++ b/Source/PopcornFX/Private/Attributes/PopcornFXAttributeSamplerSkinnedMesh.cpp @@ -625,11 +625,11 @@ namespace { const TArray &GetMasterBoneMap(const USkinnedMeshComponent *skinnedMesh) { -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) return skinnedMesh->GetLeaderBoneMap(); #else return skinnedMesh->GetMasterBoneMap(); -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) } const TArray &GetSections(const FSkeletalMeshLODRenderData *lodRenderData) @@ -672,11 +672,11 @@ namespace m_SkinnedMeshComponent = skinnedMesh; if (m_SkinnedMeshComponent == null) return false; -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) m_SkeletalMesh = Cast(m_SkinnedMeshComponent->GetSkinnedAsset()); #else m_SkeletalMesh = m_SkinnedMeshComponent->SkeletalMesh; -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) if (m_SkeletalMesh == null) return false; @@ -743,19 +743,19 @@ namespace } } -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) const USkinnedMeshComponent *masterPoseComponent = buildDesc.m_SkinnedMeshComponent->LeaderPoseComponent.Get(); #else const USkinnedMeshComponent *masterPoseComponent = buildDesc.m_SkinnedMeshComponent->MasterPoseComponent.Get(); -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) const bool hasMasterPoseComponent = masterPoseComponent != null; if (hasMasterPoseComponent) { -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) PK_ASSERT(GetMasterBoneMap(buildDesc.m_SkinnedMeshComponent).Num() == SkeletalMeshRefSkeleton(Cast(buildDesc.m_SkinnedMeshComponent->GetSkinnedAsset())).GetNum()); #else PK_ASSERT(GetMasterBoneMap(buildDesc.m_SkinnedMeshComponent).Num() == SkeletalMeshRefSkeleton(buildDesc.m_SkinnedMeshComponent->SkeletalMesh).GetNum()); -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) } PK_ONLY_IF_ASSERTS(u32 totalVertices = 0); @@ -899,11 +899,11 @@ bool UPopcornFXAttributeSamplerSkinnedMesh::BuildInitialPose() if (buildDesc.m_LODRenderData->SkinWeightVertexBuffer.GetBoneInfluenceType() == UnlimitedBoneInfluence) { -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) UE_LOG(LogPopcornFXAttributeSamplerSkinned, Warning, TEXT("Cannot build mesh '%s' for sampling: Unlimited bone influences not supported for sampling"), *buildDesc.m_SkinnedMeshComponent->GetSkinnedAsset()->GetName()); #else UE_LOG(LogPopcornFXAttributeSamplerSkinned, Warning, TEXT("Cannot build mesh '%s' for sampling: Unlimited bone influences not supported for sampling"), *buildDesc.m_SkinnedMeshComponent->SkeletalMesh->GetName()); -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) return false; } diff --git a/Source/PopcornFX/Private/Attributes/PopcornFXAttributeSamplers.cpp b/Source/PopcornFX/Private/Attributes/PopcornFXAttributeSamplers.cpp index 8ac36a9..1e20f65 100644 --- a/Source/PopcornFX/Private/Attributes/PopcornFXAttributeSamplers.cpp +++ b/Source/PopcornFX/Private/Attributes/PopcornFXAttributeSamplers.cpp @@ -35,6 +35,7 @@ #include "Curves/RichCurve.h" #include "Engine/Texture.h" #include "Engine/Texture2D.h" +#include "UObject/Package.h" #if WITH_EDITOR # include "Editor.h" diff --git a/Source/PopcornFX/Private/DependencyModules/PopcornFXDependencyModuleLevelEditor.cpp b/Source/PopcornFX/Private/DependencyModules/PopcornFXDependencyModuleLevelEditor.cpp index 7c92961..fd55b40 100644 --- a/Source/PopcornFX/Private/DependencyModules/PopcornFXDependencyModuleLevelEditor.cpp +++ b/Source/PopcornFX/Private/DependencyModules/PopcornFXDependencyModuleLevelEditor.cpp @@ -110,31 +110,31 @@ void FPopcornFXDependencyModuleLevelEditor::FillPopcornFXMenu(FMenuBuilder &menu menuBuilder.AddMenuEntry( LOCTEXT("DocumentationTitle", "Documentation"), LOCTEXT("DocumentationTooltip", "Opens the PopcornFX Wiki"), -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) FSlateIcon(FAppStyle::GetAppStyleSetName(), "LevelEditor.BrowseDocumentation"), #else FSlateIcon(FEditorStyle::GetStyleSetName(), "LevelEditor.BrowseDocumentation"), -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) FUIAction(FExecuteAction::CreateRaw(this, &FPopcornFXDependencyModuleLevelEditor::OpenDocumentationURL, *FPopcornFXPlugin::DocumentationURL()))); menuBuilder.AddMenuEntry( LOCTEXT("WikiTitle", "Plugin Wiki"), LOCTEXT("WikiTooltip", "Opens the PopcornFX UE plugin wiki"), -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) FSlateIcon(FAppStyle::GetAppStyleSetName(), "LevelEditor.BrowseDocumentation"), #else FSlateIcon(FEditorStyle::GetStyleSetName(), "LevelEditor.BrowseDocumentation"), -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) FUIAction(FExecuteAction::CreateRaw(this, &FPopcornFXDependencyModuleLevelEditor::OpenDocumentationURL, *FPopcornFXPlugin::PluginWikiURL()))); menuBuilder.AddMenuEntry( LOCTEXT("DiscordTitle", "Discord"), LOCTEXT("DiscordTooltip", "Join PopcornFX Discord server"), -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) FSlateIcon(FAppStyle::GetAppStyleSetName(), "LevelEditor.BrowseDocumentation"), #else FSlateIcon(FEditorStyle::GetStyleSetName(), "LevelEditor.BrowseDocumentation"), -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) FUIAction(FExecuteAction::CreateRaw(this, &FPopcornFXDependencyModuleLevelEditor::OpenDocumentationURL, *FPopcornFXPlugin::DiscordURL()))); } menuBuilder.EndSection(); @@ -151,11 +151,11 @@ void FPopcornFXDependencyModuleLevelEditor::FillPopcornFXMenu(FMenuBuilder &menu menuBuilder.AddMenuEntry( LOCTEXT("OpenSourcePackTitle", "Open PopcornFX Editor Project"), tooltip, -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) FSlateIcon(FAppStyle::GetAppStyleSetName(), "PopcornFXLevelEditor.OpenSourcePack"), #else FSlateIcon(FEditorStyle::GetStyleSetName(), "PopcornFXLevelEditor.OpenSourcePack"), -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) FUIAction(FExecuteAction::CreateRaw(this, &FPopcornFXDependencyModuleLevelEditor::OpenSourcePack), FCanExecuteAction::CreateRaw(this, &FPopcornFXDependencyModuleLevelEditor::CanOpenSourcePack))); } @@ -166,51 +166,51 @@ void FPopcornFXDependencyModuleLevelEditor::FillPopcornFXMenu(FMenuBuilder &menu menuBuilder.AddMenuEntry( LOCTEXT("RuntimeSettingsTitle", "Runtime settings"), LOCTEXT("RuntimeSettingsTooltip", "Opens the project runtime settings"), -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) FSlateIcon(FAppStyle::GetAppStyleSetName(), "ProjectSettings.TabIcon"), #else FSlateIcon(FEditorStyle::GetStyleSetName(), "ProjectSettings.TabIcon"), -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) FUIAction(FExecuteAction::CreateRaw(this, &FPopcornFXDependencyModuleLevelEditor::OpenSettings, TEXT("PopcornFXSettings")))); menuBuilder.AddMenuEntry( LOCTEXT("EditorSettingsTitle", "Editor settings"), LOCTEXT("EditorSettingsTooltip", "Opens the project editor settings"), -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) FSlateIcon(FAppStyle::GetAppStyleSetName(), "ProjectSettings.TabIcon"), #else FSlateIcon(FEditorStyle::GetStyleSetName(), "ProjectSettings.TabIcon"), -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) FUIAction(FExecuteAction::CreateRaw(this, &FPopcornFXDependencyModuleLevelEditor::OpenSettings, TEXT("PopcornFXSettingsEditor")))); menuBuilder.AddMenuEntry( LOCTEXT("CmdStatPopcornFXTitle", "Cmd stat PopcornFX"), LOCTEXT("CmdStatPopcornFXTooltip", "Runs command \"stat PopcornFX\": Toggles PopcornFX Stats display."), -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) FSlateIcon(FAppStyle::GetAppStyleSetName(), "Log.TabIcon"), #else FSlateIcon(FEditorStyle::GetStyleSetName(), "Log.TabIcon"), -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) FUIAction(FExecuteAction::CreateRaw(this, &FPopcornFXDependencyModuleLevelEditor::RunCommand, TEXT("stat PopcornFX")))); menuBuilder.AddMenuEntry( LOCTEXT("CmdPopcornFXProfilerHUDTitle", "Cmd ToggleProfilerHUD"), LOCTEXT("CmdPopcornFXProfilerHUDTooltip", "Runs command \"PopcornFX.ToggleProfilerHUD\": Toggles PopcornFX Profiler HUD."), -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) FSlateIcon(FAppStyle::GetAppStyleSetName(), "Log.TabIcon"), #else FSlateIcon(FEditorStyle::GetStyleSetName(), "Log.TabIcon"), -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) FUIAction(FExecuteAction::CreateRaw(this, &FPopcornFXDependencyModuleLevelEditor::RunCommand, TEXT("PopcornFX.ToggleProfilerHUD")))); menuBuilder.AddMenuEntry( LOCTEXT("CmdPopcornFXDebugHUDTitle", "Cmd ToggleMemoryHUD"), LOCTEXT("CmdPopcornFXDebugHUDTooltip", "Runs command \"PopcornFX.ToggleMemoryHUD\": Toggles PopcornFX Memory HUD."), -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) FSlateIcon(FAppStyle::GetAppStyleSetName(), "Log.TabIcon"), #else FSlateIcon(FEditorStyle::GetStyleSetName(), "Log.TabIcon"), -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) FUIAction(FExecuteAction::CreateRaw(this, &FPopcornFXDependencyModuleLevelEditor::RunCommand, TEXT("PopcornFX.ToggleMemoryHUD")))); } diff --git a/Source/PopcornFX/Private/Editor/CustomizeDetails/PopcornFXDetailsAttributeList.cpp b/Source/PopcornFX/Private/Editor/CustomizeDetails/PopcornFXDetailsAttributeList.cpp index 84fe137..e0f9f5f 100644 --- a/Source/PopcornFX/Private/Editor/CustomizeDetails/PopcornFXDetailsAttributeList.cpp +++ b/Source/PopcornFX/Private/Editor/CustomizeDetails/PopcornFXDetailsAttributeList.cpp @@ -392,11 +392,11 @@ namespace TSharedPtr inlineSplitter; SAssignNew(inlineSplitter, SSplitter) -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) .Style(FAppStyle::Get(), "DetailsView.Splitter") #else .Style(FEditorStyle::Get(), "DetailsView.Splitter") -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) .PhysicalSplitterHandleSize(1.0f) .HitDetectionSplitterHandleSize(5.0f) + SSplitter::Slot() @@ -439,11 +439,11 @@ namespace .Padding(0.0f, 2.0f) [ SNew(SSplitter) -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) .Style(FAppStyle::Get(), "DetailsView.Splitter") #else .Style(FEditorStyle::Get(), "DetailsView.Splitter") -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) .PhysicalSplitterHandleSize(1.0f) .HitDetectionSplitterHandleSize(5.0f) + SSplitter::Slot() @@ -879,19 +879,19 @@ namespace .OnClicked(this, &TSelf::OnDimResetClicked, dimi) .Visibility(this, &TSelf::GetDimResetVisibility, dimi) .ToolTipText(LOCTEXT("ResetToDefaultToolTip", "Reset to Default")) -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) .ButtonStyle(FAppStyle::Get(), "NoBorder") #else .ButtonStyle(FEditorStyle::Get(), "NoBorder") -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) .Content() [ SNew(SImage) -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) .Image(FAppStyle::GetBrush("PropertyWindow.DiffersFromDefault")) #else .Image(FEditorStyle::GetBrush("PropertyWindow.DiffersFromDefault")) -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) ]; } @@ -901,19 +901,19 @@ namespace .OnClicked(this, &TSelf::OnResetClicked) .Visibility(this, &TSelf::GetResetVisibility) .ToolTipText(LOCTEXT("ResetToDefaultToolTip", "Reset to Default")) -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) .ButtonStyle(FAppStyle::Get(), "NoBorder") #else .ButtonStyle(FEditorStyle::Get(), "NoBorder") -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) .Content() [ SNew(SImage) -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) .Image(FAppStyle::GetBrush("PropertyWindow.DiffersFromDefault")) #else .Image(FEditorStyle::GetBrush("PropertyWindow.DiffersFromDefault")) -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) ]; } @@ -1272,11 +1272,11 @@ namespace TSharedPtr inlineSplitter; SAssignNew(inlineSplitter, SSplitter) -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) .Style(FAppStyle::Get(), "DetailsView.Splitter") #else .Style(FEditorStyle::Get(), "DetailsView.Splitter") -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) .PhysicalSplitterHandleSize(1.0f) .HitDetectionSplitterHandleSize(5.0f) + SSplitter::Slot() @@ -1353,11 +1353,11 @@ namespace .FillHeight(1.0f) [ SNew(SSplitter) -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) .Style(FAppStyle::Get(), "DetailsView.Splitter") #else .Style(FEditorStyle::Get(), "DetailsView.Splitter") -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) .PhysicalSplitterHandleSize(1.0f) .HitDetectionSplitterHandleSize(5.0f) + SSplitter::Slot() @@ -1624,11 +1624,11 @@ namespace [ SNew(STextBlock) .Text(m_CategoryName) -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) .Font(FAppStyle::GetFontStyle("PropertyWindow.NormalFont")) #else .Font(FEditorStyle::GetFontStyle("PropertyWindow.NormalFont")) -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) ] ] ] diff --git a/Source/PopcornFX/Private/Editor/EditorHelpers.cpp b/Source/PopcornFX/Private/Editor/EditorHelpers.cpp index 23f61c2..7ff4ff7 100644 --- a/Source/PopcornFX/Private/Editor/EditorHelpers.cpp +++ b/Source/PopcornFX/Private/Editor/EditorHelpers.cpp @@ -11,11 +11,11 @@ #include "AssetToolsModule.h" #include "UObject/NameTypes.h" #include "FileHelpers.h" -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) # include "AssetRegistry/AssetRegistryModule.h" #else # include "AssetRegistryModule.h" -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) #include "IAssetTools.h" #include "Factories/Factory.h" #include "Editor.h" diff --git a/Source/PopcornFX/Private/Editor/PopcornFXEffectEditor.cpp b/Source/PopcornFX/Private/Editor/PopcornFXEffectEditor.cpp index 334959f..7b8e96d 100644 --- a/Source/PopcornFX/Private/Editor/PopcornFXEffectEditor.cpp +++ b/Source/PopcornFX/Private/Editor/PopcornFXEffectEditor.cpp @@ -191,11 +191,11 @@ void FPopcornFXEffectEditor::FillEffectToolbar(FToolBarBuilder &toolbarBuilder) .ToolTipText(LOCTEXT("DelayTooltip", "Time before the emitter restarts")) .MinValue(0.0f) .MaxValue(20.0f) -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) .Font(FAppStyle::GetFontStyle(TEXT("MenuItem.Font"))) #else .Font(FEditorStyle::GetFontStyle(TEXT("MenuItem.Font"))) -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) .Value(PreviewViewport.Get(), &SPopcornFXEffectPreviewViewport::OnGetLoopDelayValue) .OnValueChanged(PreviewViewport.Get(), &SPopcornFXEffectPreviewViewport::OnLoopDelayValueChanged) ] diff --git a/Source/PopcornFX/Private/Editor/PropertyCustomization/PopcornFXCustomizationAssetDep.cpp b/Source/PopcornFX/Private/Editor/PropertyCustomization/PopcornFXCustomizationAssetDep.cpp index d623145..7895ab0 100644 --- a/Source/PopcornFX/Private/Editor/PropertyCustomization/PopcornFXCustomizationAssetDep.cpp +++ b/Source/PopcornFX/Private/Editor/PropertyCustomization/PopcornFXCustomizationAssetDep.cpp @@ -15,11 +15,11 @@ #include "DetailWidgetRow.h" #include "PropertyCustomizationHelpers.h" #include "AssetThumbnail.h" -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) # include "AssetRegistry/AssetData.h" #else # include "AssetData.h" -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) #include "Widgets/SBoxPanel.h" #include "Widgets/Input/SEditableTextBox.h" #include "Widgets/Layout/SSpacer.h" @@ -75,11 +75,11 @@ void FPopcornFXCustomizationAssetDep::CustomizeHeader( // Source\Editor\PropertyEditor\Private\UserInterface\PropertyEditor\PropertyEditorConstants.cpp static const FName PropertyFontStyle( TEXT("PropertyWindow.NormalFont") ); -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) FSlateFontInfo FontStyle = FAppStyle::GetFontStyle(PropertyFontStyle); #else FSlateFontInfo FontStyle = FEditorStyle::GetFontStyle(PropertyFontStyle); -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) HeaderRow.NameContent() .MinDesiredWidth(125.f * 3.f) @@ -117,19 +117,19 @@ void FPopcornFXCustomizationAssetDep::CustomizeHeader( .OnClicked(this, &FPopcornFXCustomizationAssetDep::OnResetClicked) .Visibility(this, &FPopcornFXCustomizationAssetDep::GetResetVisibility) .ToolTipText(LOCTEXT("ResetToDefaultToolTip", "Reset to Default")) -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) .ButtonStyle(FAppStyle::Get(), "NoBorder") #else .ButtonStyle(FEditorStyle::Get(), "NoBorder") -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) .Content() [ SNew(SImage) -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) .Image(FAppStyle::GetBrush("PropertyWindow.DiffersFromDefault")) #else .Image(FEditorStyle::GetBrush("PropertyWindow.DiffersFromDefault")) -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) ] ] ] @@ -184,11 +184,11 @@ bool FPopcornFXCustomizationAssetDep::OnFilterAssetPicker(const FAssetData& InAs UClass *assetClass = InAssetData.GetClass(); // return filterOut; return !self->IsCompatibleClass(assetClass) || -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) !InAssetData.GetSoftObjectPath().ToString().StartsWith(FPopcornFXPlugin::Get().Settings()->PackMountPoint); #else !InAssetData.ObjectPath.ToString().StartsWith(FPopcornFXPlugin::Get().Settings()->PackMountPoint); -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) } FReply FPopcornFXCustomizationAssetDep::OnResetClicked() diff --git a/Source/PopcornFX/Private/Editor/PropertyCustomization/PopcornFXCustomizationRendererMaterial.cpp b/Source/PopcornFX/Private/Editor/PropertyCustomization/PopcornFXCustomizationRendererMaterial.cpp index 672357e..d4f9a7f 100644 --- a/Source/PopcornFX/Private/Editor/PropertyCustomization/PopcornFXCustomizationRendererMaterial.cpp +++ b/Source/PopcornFX/Private/Editor/PropertyCustomization/PopcornFXCustomizationRendererMaterial.cpp @@ -57,11 +57,11 @@ void FPopcornFXCustomizationRendererMaterial::CustomizeHeader( ; static const FName propertyFontStyle(TEXT("PropertyWindow.NormalFont")); -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) FSlateFontInfo fontStyle = FAppStyle::GetFontStyle(propertyFontStyle); #else FSlateFontInfo fontStyle = FEditorStyle::GetFontStyle(propertyFontStyle); -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) uint32 numBaseObjects; //baseObjectNames->GetNumChildren(numBaseObjects); diff --git a/Source/PopcornFX/Private/Editor/PropertyCustomization/PopcornFXCustomizationSubRendererMaterial.cpp b/Source/PopcornFX/Private/Editor/PropertyCustomization/PopcornFXCustomizationSubRendererMaterial.cpp index 3bada8a..4ce667c 100644 --- a/Source/PopcornFX/Private/Editor/PropertyCustomization/PopcornFXCustomizationSubRendererMaterial.cpp +++ b/Source/PopcornFX/Private/Editor/PropertyCustomization/PopcornFXCustomizationSubRendererMaterial.cpp @@ -194,19 +194,19 @@ void FPopcornFXCustomizationSubRendererMaterial::CustomizeHeader( // too slow .Visibility(this, &FPopcornFXCustomizationSubRendererMaterial::GetResetVisibility) .ToolTipText(LOCTEXT("ResetToDefaultToolTip", "Reset to Default")) -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) .ButtonStyle(FAppStyle::Get(), "NoBorder") #else .ButtonStyle(FEditorStyle::Get(), "NoBorder") -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) .Content() [ SNew(SImage) -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) .Image(FAppStyle::GetBrush("PropertyWindow.DiffersFromDefault")) #else .Image(FEditorStyle::GetBrush("PropertyWindow.DiffersFromDefault")) -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) ] ] ] diff --git a/Source/PopcornFX/Private/GPUSim/PopcornFXGPUSim_D3D11.cpp b/Source/PopcornFX/Private/GPUSim/PopcornFXGPUSim_D3D11.cpp index 948fa95..040035b 100644 --- a/Source/PopcornFX/Private/GPUSim/PopcornFXGPUSim_D3D11.cpp +++ b/Source/PopcornFX/Private/GPUSim/PopcornFXGPUSim_D3D11.cpp @@ -102,7 +102,10 @@ FRHIVertexBuffer *StreamBufferResourceToRHI(const PopcornFX::SParticleStreamB PK_ASSERT((desc.BindFlags & D3D11_BIND_SHADER_RESOURCE) != 0); // is BUF_ShaderResource PK_ASSERT((desc.Usage & D3D11_USAGE_DYNAMIC) == 0); // no BUF_AnyDynamic PK_ASSERT((desc.CPUAccessFlags) == 0); // no BUF_AnyDynamic - + + // TODO: Unify SParticleStreamBuffer_D3D11 with other APIs, just provide a m_ByteSize member.. + const u32 sizeInBytes = desc.ByteWidth; + // Fixed #12899: removed BUF_UnorderedAccess | BUF_ByteAddressBuffer from the buffer usage, as it leads to crashes on some AMD GPU hardware. // The driver does not properly set the buffer stride as it considers it raw (although the buffer isn't bound as a raw buffer). // The BUF_UnorderedAccess could technically be left active, but none of the UE plugin shaders are binding any of the PK sim streams as UAV anyways. diff --git a/Source/PopcornFX/Private/GPUSim/PopcornFXGPUSim_D3D12.cpp b/Source/PopcornFX/Private/GPUSim/PopcornFXGPUSim_D3D12.cpp index 7401927..03ad104 100644 --- a/Source/PopcornFX/Private/GPUSim/PopcornFXGPUSim_D3D12.cpp +++ b/Source/PopcornFX/Private/GPUSim/PopcornFXGPUSim_D3D12.cpp @@ -141,11 +141,11 @@ void FD3D12ResourceLocation::SetResource(FD3D12Resource* Value) } UnderlyingResource = Value; -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) ResidencyHandle = &UnderlyingResource->GetResidencyHandle(); #else ResidencyHandle = UnderlyingResource->GetResidencyHandle(); -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) } //---------------------------------------------------------------------------- diff --git a/Source/PopcornFX/Private/GPUSim/PopcornFXSortComputeShader.cpp b/Source/PopcornFX/Private/GPUSim/PopcornFXSortComputeShader.cpp index 24a4a01..14d46be 100644 --- a/Source/PopcornFX/Private/GPUSim/PopcornFXSortComputeShader.cpp +++ b/Source/PopcornFX/Private/GPUSim/PopcornFXSortComputeShader.cpp @@ -259,7 +259,7 @@ void FPopcornFXSortComputeShader_Sorter::DispatchGenIndiceBatch(FRHICommandList& PK_ASSERT(params.m_Count > 0); -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) SetComputePipelineState(RHICmdList, shader); #else RHICmdList.SetComputeShader(shader); @@ -391,11 +391,11 @@ void FPopcornFXSortComputeShader_Sorter::DispatchSort(FRHICommandList& RHICmdLis //---------------------------------------------------------------------------- // Up Sweep -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) SetComputePipelineState(RHICmdList, upSweepShader); #else RHICmdList.SetComputeShader(upSweepShader); -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) if (PK_VERIFY(upSweep->InKeys.IsBound())) { @@ -441,11 +441,11 @@ void FPopcornFXSortComputeShader_Sorter::DispatchSort(FRHICommandList& RHICmdLis //---------------------------------------------------------------------------- // Up Sweep Offsets -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) SetComputePipelineState(RHICmdList, upSweepOffsetsShader); #else RHICmdList.SetComputeShader(upSweepOffsetsShader); -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) if (PK_VERIFY(upSweepOffsets->InOutOffsets.IsBound())) { @@ -481,11 +481,11 @@ void FPopcornFXSortComputeShader_Sorter::DispatchSort(FRHICommandList& RHICmdLis //---------------------------------------------------------------------------- // Down Sweep -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) SetComputePipelineState(RHICmdList, downSweepShader); #else RHICmdList.SetComputeShader(downSweepShader); -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) if (PK_VERIFY(downSweep->InOffsets.IsBound())) { diff --git a/Source/PopcornFX/Private/Internal/ParticleScene.cpp b/Source/PopcornFX/Private/Internal/ParticleScene.cpp index 53d74ef..6750356 100644 --- a/Source/PopcornFX/Private/Internal/ParticleScene.cpp +++ b/Source/PopcornFX/Private/Internal/ParticleScene.cpp @@ -1372,7 +1372,7 @@ class FBlockQueryCallbackChaos : public ICollisionQueryFilterCallbackBase return ECollisionQueryHitType::Block; } -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) virtual ECollisionQueryHitType PostFilter(const FCollisionFilterData &filterData, const ChaosInterface::FPTQueryHit &hit) override { return ECollisionQueryHitType::Block; } virtual ECollisionQueryHitType PreFilter(const FCollisionFilterData &filterData, const Chaos::FPerShapeData &shape, const Chaos::FGeometryParticleHandle &actor) { @@ -1386,7 +1386,7 @@ class FBlockQueryCallbackChaos : public ICollisionQueryFilterCallbackBase virtual PxQueryHitType::Enum preFilter(const PxFilterData& filterData, const PxShape* shape, const PxRigidActor* actor, PxHitFlags& queryFlags) { PK_ASSERT_NOT_REACHED(); return PxQueryHitType::eNONE; } virtual PxQueryHitType::Enum postFilter(const PxFilterData& filterData, const PxQueryHit& hit) { PK_ASSERT_NOT_REACHED(); return PxQueryHitType::eNONE; } # endif // PHYSICS_INTERFACE_PHYSX -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) }; #endif @@ -2155,7 +2155,7 @@ static void _D3D11_ExecuteImmTasksArray(CParticleScene *self) // Fake a UAV transition so UE is happy, and disables UAV overlap (undefined behavior, generates random artefacts in the D3D11 GPU sim) // This is ugly, but they removed the implementations of FD3D11DynamicRHI::RHIBeginUAVOverlap/RHIEndUAVOverlap in 4.26. FRHICommandListImmediate &RHICmdList = FRHICommandListExecutor::GetImmediateCommandList(); -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5) && (ENGINE_MINOR_VERSION >= 1) if (self->m_D3D11_DummyResource == null) { check(self->m_D3D11_DummyView == null); @@ -2174,7 +2174,7 @@ static void _D3D11_ExecuteImmTasksArray(CParticleScene *self) RHICmdList.Transition(FRHITransitionInfo(self->m_D3D11_DummyView, ERHIAccess::UAVGraphics, ERHIAccess::UAVCompute)); #else RHICmdList.Transition(FRHITransitionInfo((FRHIUnorderedAccessView*)0x1234, ERHIAccess::UAVGraphics, ERHIAccess::UAVCompute)); -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5) && (ENGINE_MINOR_VERSION >= 1) RHICmdList.ImmediateFlush(EImmediateFlushType::FlushRHIThread); for (u32 i = 0; i < m_Exec_D3D11_Tasks.Count(); ++i) @@ -2215,7 +2215,7 @@ void CParticleScene::D3D11_Destroy() // GPU_Destroy() updateManager_D3D11->BindD3D11(null, null); } } -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5) && (ENGINE_MINOR_VERSION >= 1) if (m_D3D11_DummyResource != null && m_D3D11_DummyView != null) { // Delete view, release resource for proper ref count tracking. @@ -2229,7 +2229,7 @@ void CParticleScene::D3D11_Destroy() // GPU_Destroy() check(m_D3D11_DummyResource == null); check(m_D3D11_DummyView == null); } -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5) && (ENGINE_MINOR_VERSION >= 1) m_D3D11_DeferedContext = null; m_D3D11_Device = null; @@ -2377,11 +2377,11 @@ namespace #endif #if (PK_PARTICLES_HAS_STATS != 0) -# if (ENGINE_MAJOR_VERSION == 5) +# if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) m_DirectCommandQueue = GetID3D12DynamicRHI()->RHIGetCommandQueue(); # else m_DirectCommandQueue = dynamicRHI->RHIGetD3DCommandQueue(); // Returns the direct command queue -# endif // (ENGINE_MAJOR_VERSION == 5) +# endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) #endif // (PK_PARTICLES_HAS_STATS != 0) if (!PK_VERIFY(m_Device != null)) { @@ -2405,13 +2405,13 @@ static void _D3D12_ExecuteTasksArray(CParticleScene *self) auto &m_Exec_D3D12_Tasks = self->m_Exec_D3D12_Tasks; //auto &m_UpdateLock = self->m_UpdateLock; -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) ID3D12CommandQueue *commandQueue = GetID3D12DynamicRHI()->RHIGetCommandQueue(); #else PK_RELEASE_ASSERT(GDynamicRHI != null); FD3D12DynamicRHI *dynamicRHI = static_cast(GDynamicRHI); ID3D12CommandQueue *commandQueue = dynamicRHI->RHIGetD3DCommandQueue(); // Returns the direct command queue -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) // TODO: Investigate performance when using the compute command queue diff --git a/Source/PopcornFX/Private/Internal/ParticleScene.h b/Source/PopcornFX/Private/Internal/ParticleScene.h index 3bea5be..3d70212 100644 --- a/Source/PopcornFX/Private/Internal/ParticleScene.h +++ b/Source/PopcornFX/Private/Internal/ParticleScene.h @@ -33,13 +33,13 @@ class UPopcornFXSceneComponent; class FPopcornFXSceneProxy; -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) # define PK_WITH_PHYSX 0 # define PK_WITH_CHAOS 1 #else # define PK_WITH_PHYSX PHYSICS_INTERFACE_PHYSX && WITH_PHYSX # define PK_WITH_CHAOS !(PK_WITH_PHYSX) && WITH_CHAOS -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) // The plugin doesn't support both being active at the same time. #if PK_WITH_PHYSX && PK_WITH_CHAOS @@ -314,10 +314,10 @@ class CParticleScene : public PopcornFX::IParticleScene struct ID3D11Device *D3D11_Device() const { PK_ASSERT(D3D11Ready()); return m_D3D11_Device; } struct ID3D11DeviceContext *D3D11_DeferedContext() const { PK_ASSERT(D3D11Ready()); return m_D3D11_DeferedContext; } -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5) && (ENGINE_MINOR_VERSION >= 1) class FRHIBuffer *m_D3D11_DummyResource = null; class FRHIUnorderedAccessView *m_D3D11_DummyView = null; -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5) && (ENGINE_MINOR_VERSION >= 1) private: bool D3D11_InitIFN(); diff --git a/Source/PopcornFX/Private/Platforms/PopcornFXPlatform.h b/Source/PopcornFX/Private/Platforms/PopcornFXPlatform.h index d5f588a..83621f2 100644 --- a/Source/PopcornFX/Private/Platforms/PopcornFXPlatform.h +++ b/Source/PopcornFX/Private/Platforms/PopcornFXPlatform.h @@ -30,7 +30,7 @@ FWD_PK_API_END //---------------------------------------------------------------------------- -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) # define PKFX_COMMON_NewImageFromTexture 1 #else # if PLATFORM_PS4 || PLATFORM_XBOXONE @@ -38,7 +38,7 @@ FWD_PK_API_END # else # define PKFX_COMMON_NewImageFromTexture 1 # endif // PLATFORM_PS4 || PLATFORM_XBOXONE -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) //---------------------------------------------------------------------------- diff --git a/Source/PopcornFX/Private/Platforms/PopcornFXPlatformCommon.cpp b/Source/PopcornFX/Private/Platforms/PopcornFXPlatformCommon.cpp index 04bed7b..64e8c2d 100644 --- a/Source/PopcornFX/Private/Platforms/PopcornFXPlatformCommon.cpp +++ b/Source/PopcornFX/Private/Platforms/PopcornFXPlatformCommon.cpp @@ -420,12 +420,12 @@ namespace PopcornFX::CMessageStream &outMessages) { TArray compilerFlags; -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) return CompileComputeShaderForAPI(source, buildInfos, "D3D12", SP_PCD3D_SM6, "DXBC", compilerFlags, outBytecode, outMessages); #else compilerFlags.Add(CFLAG_ForceDXC); // Force SM6.0 return CompileComputeShaderForAPI(source, buildInfos, "D3D12", SP_PCD3D_SM5, "DXBC", compilerFlags, outBytecode, outMessages); -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) } } diff --git a/Source/PopcornFX/Private/PopcornFXSDK.h b/Source/PopcornFX/Private/PopcornFXSDK.h index 63baffd..af79579 100644 --- a/Source/PopcornFX/Private/PopcornFXSDK.h +++ b/Source/PopcornFX/Private/PopcornFXSDK.h @@ -28,9 +28,6 @@ # ifndef PLATFORM_XBOXONE # define PLATFORM_XBOXONE 0 # endif -# if (ENGINE_MINOR_VERSION < 1) -# error PopcornFX Plugin only supported in UE5 >= 5.1 -# endif #endif // (ENGINE_MAJOR_VERSION == 5) #if PLATFORM_WINDOWS diff --git a/Source/PopcornFX/Private/Render/BatchDrawer_Billboard_CPU.cpp b/Source/PopcornFX/Private/Render/BatchDrawer_Billboard_CPU.cpp index f0d4aa5..567c615 100644 --- a/Source/PopcornFX/Private/Render/BatchDrawer_Billboard_CPU.cpp +++ b/Source/PopcornFX/Private/Render/BatchDrawer_Billboard_CPU.cpp @@ -711,11 +711,11 @@ void CBatchDrawer_Billboard_CPUBB::_IssueDrawCall_Billboard(const SUERenderConte meshElement.MaxVertexIndex = m_TotalVertexCount - 1; FDynamicPrimitiveUniformBuffer &dynamicPrimitiveUniformBuffer = collector->AllocateOneFrameResource(); -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) dynamicPrimitiveUniformBuffer.Set(localToWorld, previousLocalToWorld, bounds, localBounds, true, hasPrecomputedVolumetricLightmap, outputVelocity); #else dynamicPrimitiveUniformBuffer.Set(localToWorld, previousLocalToWorld, bounds, localBounds, true, hasPrecomputedVolumetricLightmap, drawsVelocity, outputVelocity); -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) meshElement.PrimitiveUniformBuffer = dynamicPrimitiveUniformBuffer.UniformBuffer.GetUniformBufferRHI(); PK_ASSERT(meshElement.NumPrimitives > 0); diff --git a/Source/PopcornFX/Private/Render/BatchDrawer_Billboard_GPU.cpp b/Source/PopcornFX/Private/Render/BatchDrawer_Billboard_GPU.cpp index c21b367..dcaf109 100644 --- a/Source/PopcornFX/Private/Render/BatchDrawer_Billboard_GPU.cpp +++ b/Source/PopcornFX/Private/Render/BatchDrawer_Billboard_GPU.cpp @@ -963,11 +963,11 @@ bool CBatchDrawer_Billboard_GPUBB::LaunchCustomTasks(PopcornFX::SRenderContext & copyParams.m_IsCapsule = m_CapsulesDC; copyParams.m_DrawIndirectArgsOffset = iDr * POPCORNFX_INDIRECT_ARGS_ARG_COUNT; -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) SetComputePipelineState(RHICmdList, copySizeBufferCS.GetComputeShader()); #else RHICmdList.SetComputeShader(copySizeBufferCS.GetComputeShader()); -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) copySizeBufferCS->Dispatch(RHICmdList, copyParams); } diff --git a/Source/PopcornFX/Private/Render/BatchDrawer_Light.cpp b/Source/PopcornFX/Private/Render/BatchDrawer_Light.cpp index e5b4887..9e27666 100644 --- a/Source/PopcornFX/Private/Render/BatchDrawer_Light.cpp +++ b/Source/PopcornFX/Private/Render/BatchDrawer_Light.cpp @@ -191,11 +191,11 @@ void CBatchDrawer_Light::_IssueDrawCall_Light(const SUERenderContext &renderCont PopcornFX::CGuid ldatai = lightDatas.PushBack(); FSimpleLightEntry &lightdata = lightDatas[ldatai]; -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) lightdata.Color = ToUE(colors[parti] * kColorMultiplier); #else lightdata.Color = FVector(ToUE(colors[parti] * kColorMultiplier)); -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) lightdata.Radius = radius; // Set the exponent to 0 if we want to enable inverse squared falloff diff --git a/Source/PopcornFX/Private/Render/BatchDrawer_Ribbon_CPU.cpp b/Source/PopcornFX/Private/Render/BatchDrawer_Ribbon_CPU.cpp index 942f9bd..fe2369d 100644 --- a/Source/PopcornFX/Private/Render/BatchDrawer_Ribbon_CPU.cpp +++ b/Source/PopcornFX/Private/Render/BatchDrawer_Ribbon_CPU.cpp @@ -104,12 +104,6 @@ bool CBatchDrawer_Ribbon_CPUBB::Setup(const PopcornFX::CRendererDataBase *render m_SecondUVSet = renderer->m_RendererCache->m_Flags.m_HasAtlasBlending && renderer->m_RendererCache->m_Flags.m_HasUV; m_RibbonCorrectDeformation = renderer->m_RendererCache->m_Flags.m_HasRibbonCorrectDeformation; m_FlipUVs = renderer->m_RendererCache->m_Flags.m_RotateTexture; - - const PopcornFX::ERibbonMode mode = renderer->m_Declaration.GetPropertyValue_Enum(PopcornFX::BasicRendererProperties::SID_BillboardingMode(), PopcornFX::RibbonMode_ViewposAligned); - if (mode == PopcornFX::RibbonMode_SideAxisAlignedTube) - m_VPP = (renderer->m_Declaration.GetPropertyValue_I1(PopcornFX::BasicRendererProperties::SID_GeometryRibbon_SegmentCount(), 8) + 1) * 2; - else if (mode == PopcornFX::RibbonMode_SideAxisAlignedMultiPlane) - m_VPP = renderer->m_Declaration.GetPropertyValue_I1(PopcornFX::BasicRendererProperties::SID_GeometryRibbon_PlaneCount(), 2) * 4; return true; } @@ -704,10 +698,8 @@ void CBatchDrawer_Ribbon_CPUBB::_IssueDrawCall_Ribbon(const SUERenderContext &re vsUniforms.DynamicParameterMask = matDesc.m_DynamicParameterMask; vsUniformsbillboard.RendererType = static_cast(PopcornFX::Renderer_Ribbon); - vsUniformsbillboard.TotalParticleCount = desc.m_TotalParticleCount; vsUniformsbillboard.CapsulesOffset = 0; - vsUniformsbillboard.TubesPlanesOffset = m_VPP > 0 ? 0 : vsUniformsbillboard.TotalParticleCount; // For now, no batching of tube/multiplane ribbons with quad bb modes - vsUniformsbillboard.VPP = m_VPP; + vsUniformsbillboard.TotalParticleCount = desc.m_TotalParticleCount; vsUniformsbillboard.InColorsOffset = m_AdditionalStreamOffsets[StreamOffset_Colors].OffsetForShaderConstant(); vsUniformsbillboard.InEmissiveColorsOffset = m_AdditionalStreamOffsets[StreamOffset_EmissiveColors].OffsetForShaderConstant(); vsUniformsbillboard.InAlphaCursorsOffset = m_AdditionalStreamOffsets[StreamOffset_AlphaCursors].OffsetForShaderConstant(); @@ -756,11 +748,11 @@ void CBatchDrawer_Ribbon_CPUBB::_IssueDrawCall_Ribbon(const SUERenderContext &re meshElement.MaxVertexIndex = m_TotalVertexCount - 1; FDynamicPrimitiveUniformBuffer &dynamicPrimitiveUniformBuffer = collector->AllocateOneFrameResource(); -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) dynamicPrimitiveUniformBuffer.Set(localToWorld, previousLocalToWorld, bounds, localBounds, true, hasPrecomputedVolumetricLightmap, outputVelocity); #else dynamicPrimitiveUniformBuffer.Set(localToWorld, previousLocalToWorld, bounds, localBounds, true, hasPrecomputedVolumetricLightmap, drawsVelocity, outputVelocity); -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) meshElement.PrimitiveUniformBuffer = dynamicPrimitiveUniformBuffer.UniformBuffer.GetUniformBufferRHI(); PK_ASSERT(meshElement.NumPrimitives > 0); diff --git a/Source/PopcornFX/Private/Render/BatchDrawer_Ribbon_CPU.h b/Source/PopcornFX/Private/Render/BatchDrawer_Ribbon_CPU.h index 1ef1c5a..71298ea 100644 --- a/Source/PopcornFX/Private/Render/BatchDrawer_Ribbon_CPU.h +++ b/Source/PopcornFX/Private/Render/BatchDrawer_Ribbon_CPU.h @@ -81,8 +81,6 @@ class CBatchDrawer_Ribbon_CPUBB : public PopcornFX::CRendererBatchJobs_Ribbon_CP u32 m_TotalIndexCount = 0; u32 m_RealViewCount = 0; - u8 m_VPP = 0; - ERHIFeatureLevel::Type m_FeatureLevel = ERHIFeatureLevel::Num; // UserData used to bind shader uniforms (Billboard & Ribbon) diff --git a/Source/PopcornFX/Private/Render/BatchDrawer_SkeletalMesh_CPU.cpp b/Source/PopcornFX/Private/Render/BatchDrawer_SkeletalMesh_CPU.cpp index 738b021..c7d7d84 100644 --- a/Source/PopcornFX/Private/Render/BatchDrawer_SkeletalMesh_CPU.cpp +++ b/Source/PopcornFX/Private/Render/BatchDrawer_SkeletalMesh_CPU.cpp @@ -11,7 +11,7 @@ #include "Rendering/SkeletalMeshLODRenderData.h" #include "Engine/SkeletalMesh.h" #include "Engine/Texture2D.h" -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5) && (ENGINE_MINOR_VERSION >= 1) # include "Engine/SkinnedAssetCommon.h" #endif #include "RHIStaticStates.h" @@ -965,21 +965,21 @@ void CBatchDrawer_SkeletalMesh_CPUBB::_IssueDrawCall_Mesh(const SUERenderContext if (m_MotionBlur) { TShaderMapRef< FPopcornFXComputeMBBoneTransformsCS > computeBoneTransformsCS(GetGlobalShaderMap(m_FeatureLevel)); -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) SetComputePipelineState(RHICmdList, computeBoneTransformsCS.GetComputeShader()); #else RHICmdList.SetComputeShader(computeBoneTransformsCS.GetComputeShader()); -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) computeBoneTransformsCS->Dispatch(RHICmdList, params); } else { TShaderMapRef< FPopcornFXComputeBoneTransformsCS > computeBoneTransformsCS(GetGlobalShaderMap(m_FeatureLevel)); -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) SetComputePipelineState(RHICmdList, computeBoneTransformsCS.GetComputeShader()); #else RHICmdList.SetComputeShader(computeBoneTransformsCS.GetComputeShader()); -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) computeBoneTransformsCS->Dispatch(RHICmdList, params); } } diff --git a/Source/PopcornFX/Private/Render/BatchDrawer_Triangle_CPU.cpp b/Source/PopcornFX/Private/Render/BatchDrawer_Triangle_CPU.cpp index ffa3379..fbbf0d9 100644 --- a/Source/PopcornFX/Private/Render/BatchDrawer_Triangle_CPU.cpp +++ b/Source/PopcornFX/Private/Render/BatchDrawer_Triangle_CPU.cpp @@ -621,11 +621,11 @@ void CBatchDrawer_Triangle_CPUBB::_IssueDrawCall_Triangle(const SUERenderContext meshElement.MinVertexIndex = 0; meshElement.MaxVertexIndex = (m_TotalParticleCount * 3) - 1; FDynamicPrimitiveUniformBuffer &dynamicPrimitiveUniformBuffer = collector->AllocateOneFrameResource(); -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) dynamicPrimitiveUniformBuffer.Set(localToWorld, previousLocalToWorld, bounds, localBounds, true, hasPrecomputedVolumetricLightmap, outputVelocity); #else dynamicPrimitiveUniformBuffer.Set(localToWorld, previousLocalToWorld, bounds, localBounds, true, hasPrecomputedVolumetricLightmap, drawsVelocity, outputVelocity); -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) meshElement.PrimitiveUniformBuffer = dynamicPrimitiveUniformBuffer.UniformBuffer.GetUniformBufferRHI(); PK_ASSERT(meshElement.NumPrimitives > 0); diff --git a/Source/PopcornFX/Private/Render/PopcornFXVertexFactory.h b/Source/PopcornFX/Private/Render/PopcornFXVertexFactory.h index 9206e8b..e04f28d 100644 --- a/Source/PopcornFX/Private/Render/PopcornFXVertexFactory.h +++ b/Source/PopcornFX/Private/Render/PopcornFXVertexFactory.h @@ -25,8 +25,6 @@ class UMaterialInterface; BEGIN_GLOBAL_SHADER_PARAMETER_STRUCT(FPopcornFXBillboardVSUniforms, POPCORNFX_API) SHADER_PARAMETER(uint32, RendererType) SHADER_PARAMETER(uint32, CapsulesOffset) - SHADER_PARAMETER(uint32, TubesPlanesOffset) - SHADER_PARAMETER(uint32, VPP) SHADER_PARAMETER(uint32, TotalParticleCount) //SHADER_PARAMETER(int, InTextureIDsOffset) SHADER_PARAMETER(int32, InColorsOffset) diff --git a/Source/PopcornFX/Public/PopcornFXVersionGenerated.h b/Source/PopcornFX/Public/PopcornFXVersionGenerated.h index a977c2c..551adfb 100644 --- a/Source/PopcornFX/Public/PopcornFXVersionGenerated.h +++ b/Source/PopcornFX/Public/PopcornFXVersionGenerated.h @@ -6,6 +6,6 @@ #pragma once #define POPCORNFX_PLUGIN_VERSION_MAJOR 2 -#define POPCORNFX_PLUGIN_VERSION_MINOR 18 -#define POPCORNFX_PLUGIN_VERSION_PATCH 0 +#define POPCORNFX_PLUGIN_VERSION_MINOR 17 +#define POPCORNFX_PLUGIN_VERSION_PATCH 5 #define POPCORNFX_PLUGIN_VERSION_TAG "" diff --git a/Source/PopcornFXEditor/Private/Nodes/PopcornFXNode_DynamicField.cpp b/Source/PopcornFXEditor/Private/Nodes/PopcornFXNode_DynamicField.cpp index 8aea05f..f778329 100644 --- a/Source/PopcornFXEditor/Private/Nodes/PopcornFXNode_DynamicField.cpp +++ b/Source/PopcornFXEditor/Private/Nodes/PopcornFXNode_DynamicField.cpp @@ -135,13 +135,13 @@ namespace PopcornFXPinDataType // Removes leading "EPopcornFXPinFieldType::" if nessecary for Pin value FString GetPinValueName(EPopcornFXPinDataType::Type value) { -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) static const TCHAR kEnumName[] = TEXT("/Script/PopcornFX.EPopcornFXPinDataType"); UEnum *pinTypeEnum = FindObject(null, kEnumName, true); #else static const TCHAR kEnumName[] = TEXT("EPopcornFXPinDataType"); UEnum *pinTypeEnum = FindObject(ANY_PACKAGE, kEnumName, true); -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) check(pinTypeEnum); FString name = pinTypeEnum->GetNameByValue(value).ToString(); static const TCHAR kEnumNameDoubleColon[] = TEXT("EPopcornFXPinDataType::"); diff --git a/Source/PopcornFXEditor/Private/PopcornFXEmitterFactory.cpp b/Source/PopcornFXEditor/Private/PopcornFXEmitterFactory.cpp index 79c4e34..b72cec6 100644 --- a/Source/PopcornFXEditor/Private/PopcornFXEmitterFactory.cpp +++ b/Source/PopcornFXEditor/Private/PopcornFXEmitterFactory.cpp @@ -6,11 +6,11 @@ #include "PopcornFXEmitterFactory.h" #include "Runtime/Launch/Resources/Version.h" -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) # include "AssetRegistry/AssetData.h" #else # include "AssetData.h" -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) #include "Assets/PopcornFXEffect.h" #include "PopcornFXEmitter.h" diff --git a/Source/PopcornFXEditor/Private/PopcornFXFileFactory.cpp b/Source/PopcornFXEditor/Private/PopcornFXFileFactory.cpp index cdee633..5988a48 100644 --- a/Source/PopcornFXEditor/Private/PopcornFXFileFactory.cpp +++ b/Source/PopcornFXEditor/Private/PopcornFXFileFactory.cpp @@ -16,11 +16,11 @@ #include "ObjectTools.h" #include "PackageTools.h" #include "AssetToolsModule.h" -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) # include "AssetRegistry/AssetRegistryModule.h" #else # include "AssetRegistryModule.h" -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) #include "EditorFramework/AssetImportData.h" #include "Editor.h" diff --git a/Source/PopcornFXEditor/Private/PopcornFXFileReimportFactory.cpp b/Source/PopcornFXEditor/Private/PopcornFXFileReimportFactory.cpp index 2f98e8e..1778dc5 100644 --- a/Source/PopcornFXEditor/Private/PopcornFXFileReimportFactory.cpp +++ b/Source/PopcornFXEditor/Private/PopcornFXFileReimportFactory.cpp @@ -10,11 +10,11 @@ #include "Runtime/Launch/Resources/Version.h" #include "EditorReimportHandler.h" -#if (ENGINE_MAJOR_VERSION == 5) +#if (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) # include "AssetRegistry/AssetRegistryModule.h" #else # include "AssetRegistryModule.h" -#endif // (ENGINE_MAJOR_VERSION == 5) +#endif // (ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION >= 1) #include "EditorFramework/AssetImportData.h" #include "UObject/UnrealType.h"