Skip to content

Commit

Permalink
PopcornFX Gem 2.13.4
Browse files Browse the repository at this point in the history
  • Loading branch information
ValPKFX committed Sep 30, 2022
1 parent b6098c9 commit fd2011b
Show file tree
Hide file tree
Showing 14 changed files with 31 additions and 30 deletions.
6 changes: 3 additions & 3 deletions Assets/shaders/Billboard/Legacy/BillboardLit_Legacy.azsl
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ struct VSOutput
float3 m_emissiveColor : COLOR1;
float m_alphaCursor : UV4;
float4 m_clipPosition : UV5;
#if !PK_O3DE_DEVELOPMENT_LIT
#if !PK_O3DE_NEW_LIT
float3 m_shadowCoords[ViewSrg::MaxCascadeCount] : UV6;
#endif
};
Expand All @@ -57,7 +57,7 @@ VSOutput BillboardVS(VertexInput input)

ComputeBillboardVertex(particleIdx, input.m_uv, vtxWorldPos, vtxNormal, vtxTangent, vtxUV0, vtxUV1, vtxTexFrameLerp);

#if !PK_O3DE_DEVELOPMENT_LIT
#if !PK_O3DE_NEW_LIT
// directional light shadow
const uint shadowIndex = ViewSrg::m_shadowIndexDirectionalLight;
if (o_enableShadows && shadowIndex < SceneSrg::m_directionalLightCount)
Expand Down Expand Up @@ -162,7 +162,7 @@ ForwardPassOutput BillboardFS(VSOutput input, bool isFrontFace : SV_IsFrontFace)
// Compute lighting:
return ComputeParticleLighting( input.m_worldPosition,
input.m_position,
#if !PK_O3DE_DEVELOPMENT_LIT
#if !PK_O3DE_NEW_LIT
input.m_shadowCoords,
#endif
vertexNormal,
Expand Down
2 changes: 1 addition & 1 deletion Assets/shaders/Common/LightingHelper.azsli
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <Atom/Features/PBR/Decals.azsli>
#include <Atom/Features/ColorManagement/TransformColor.azsli>

#define PK_O3DE_NEW_LIT 1
#define PK_O3DE_NEW_LIT 0

// Helper function to compute forward lighting output for particles:
ForwardPassOutput ComputeParticleLighting(float3 worldPosition,
Expand Down
6 changes: 3 additions & 3 deletions Assets/shaders/Mesh/Legacy/MeshLit_Legacy.azsl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ struct VertexOutput
float2 m_texCoord0 : UV1;
float m_alphaCursor : UV2;
float4 m_clipPosition : UV3;
#if !PK_O3DE_DEVELOPMENT_LIT
#if !PK_O3DE_NEW_LIT
float3 m_shadowCoords[ViewSrg::MaxCascadeCount] : UV4;
#endif
};
Expand All @@ -60,7 +60,7 @@ VertexOutput MeshVS(VertexInput input)
float4 vtxWorldPos = mul(mat, float4(input.m_position.xyz, 1));
float3 vtxNormal = mul(mat, input.m_normal.xyz);

#if !PK_O3DE_DEVELOPMENT_LIT
#if !PK_O3DE_NEW_LIT
// directional light shadow
const uint shadowIndex = ViewSrg::m_shadowIndexDirectionalLight;
if (o_enableShadows && shadowIndex < SceneSrg::m_directionalLightCount)
Expand Down Expand Up @@ -133,7 +133,7 @@ ForwardPassOutput MeshFS(VertexOutput input, bool isFrontFace : SV_IsFrontFace)
// Compute lighting:
return ComputeParticleLighting( input.m_worldPosition,
input.m_position,
#if !PK_O3DE_DEVELOPMENT_LIT
#if !PK_O3DE_NEW_LIT
input.m_shadowCoords,
#endif
vertexNormal,
Expand Down
18 changes: 9 additions & 9 deletions Assets/shaders/Ribbon/Legacy/RibbonLit_Legacy.azsl
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ struct VertexOutput
float3 m_emissiveColor : COLOR1;
float m_alphaCursor : UV2;
float4 m_clipPosition : UV3;
#if !PK_O3DE_DEVELOPMENT_LIT
#if !PK_O3DE_NEW_LIT
float3 m_shadowCoords[ViewSrg::MaxCascadeCount] : UV4;
#endif
};
Expand All @@ -78,7 +78,7 @@ struct VertexOutputAtlasBlend
float3 m_emissiveColor : COLOR1;
float m_alphaCursor : UV4;
float4 m_clipPosition : UV5;
#if !PK_O3DE_DEVELOPMENT_LIT
#if !PK_O3DE_NEW_LIT
float3 m_shadowCoords[ViewSrg::MaxCascadeCount] : UV6;
#endif
};
Expand All @@ -98,7 +98,7 @@ struct VertexOutputCorrectDeformation
float3 m_emissiveColor : COLOR1;
float m_alphaCursor : UV4;
float4 m_clipPosition : UV5;
#if !PK_O3DE_DEVELOPMENT_LIT
#if !PK_O3DE_NEW_LIT
float3 m_shadowCoords[ViewSrg::MaxCascadeCount] : UV6;
#endif
};
Expand Down Expand Up @@ -132,7 +132,7 @@ VertexOutput RibbonVS(VertexInput input)
output.m_bitangent = cross(input.m_tangent.xyz, input.m_normal) * input.m_tangent.w;
output.m_worldPosition = input.m_position.xyz;

#if !PK_O3DE_DEVELOPMENT_LIT
#if !PK_O3DE_NEW_LIT
// directional light shadow
const uint shadowIndex = ViewSrg::m_shadowIndexDirectionalLight;
if (o_enableShadows && shadowIndex < SceneSrg::m_directionalLightCount)
Expand Down Expand Up @@ -174,7 +174,7 @@ VertexOutputAtlasBlend RibbonVS_AtlasBlend(VertexInputAtlasBlend input)
output.m_bitangent = cross(input.m_normal, input.m_tangent.xyz) * input.m_tangent.w;
output.m_worldPosition = input.m_position.xyz;

#if !PK_O3DE_DEVELOPMENT_LIT
#if !PK_O3DE_NEW_LIT
// directional light shadow
const uint shadowIndex = ViewSrg::m_shadowIndexDirectionalLight;
if (o_enableShadows && shadowIndex < SceneSrg::m_directionalLightCount)
Expand Down Expand Up @@ -216,7 +216,7 @@ VertexOutputCorrectDeformation RibbonVS_CorrectDeformation(VertexInputCorrectDef
output.m_bitangent = cross(input.m_normal, input.m_tangent.xyz) * input.m_tangent.w;
output.m_worldPosition = input.m_position.xyz;

#if !PK_O3DE_DEVELOPMENT_LIT
#if !PK_O3DE_NEW_LIT
// directional light shadow
const uint shadowIndex = ViewSrg::m_shadowIndexDirectionalLight;
if (o_enableShadows && shadowIndex < SceneSrg::m_directionalLightCount)
Expand Down Expand Up @@ -267,7 +267,7 @@ ForwardPassOutput RibbonFS(VertexOutput input, bool isFrontFace : SV_IsFrontFace
// Compute lighting:
return ComputeParticleLighting( input.m_worldPosition,
input.m_position,
#if !PK_O3DE_DEVELOPMENT_LIT
#if !PK_O3DE_NEW_LIT
input.m_shadowCoords,
#endif
vertexNormal,
Expand Down Expand Up @@ -327,7 +327,7 @@ ForwardPassOutput RibbonFS_AtlasBlend(VertexOutputAtlasBlend input, bool isFront
// Compute lighting:
return ComputeParticleLighting( input.m_worldPosition,
input.m_position,
#if !PK_O3DE_DEVELOPMENT_LIT
#if !PK_O3DE_NEW_LIT
input.m_shadowCoords,
#endif
vertexNormal,
Expand Down Expand Up @@ -378,7 +378,7 @@ ForwardPassOutput RibbonFS_CorrectDeformation(VertexOutputCorrectDeformation inp
// Compute lighting:
return ComputeParticleLighting( input.m_worldPosition,
input.m_position,
#if !PK_O3DE_DEVELOPMENT_LIT
#if !PK_O3DE_NEW_LIT
input.m_shadowCoords,
#endif
vertexNormal,
Expand Down
2 changes: 1 addition & 1 deletion Code/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# https://www.popcornfx.com/terms-and-conditions/
#----------------------------------------------------------------------------

set(POPCORNFX_VERSION 2.13.3)
set(POPCORNFX_VERSION 2.13.4)
set(POPCORNFX_LICENSE O3DE)

if (PK_O3DE_MAJOR_VERSION GREATER_EQUAL 2205)
Expand Down
4 changes: 2 additions & 2 deletions Code/Include/PopcornFX/PopcornFXBus.h
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,8 @@ namespace PopcornFX
};
using PopcornFXEmitterEditorComponentEventsBus = AZ::EBus <PopcornFXEmitterEditorComponentEvents>;

static const AZ::Uuid EmitterComponentTypeId = "{515957e3-8354-4048-8d6c-98628ef21804}";
static const AZ::Uuid EditorEmitterComponentTypeId = "{B62ED02E-731B-4ACD-BCA1-78EF92528228}";
static const AZ::Uuid EmitterComponentTypeId = AZ::Uuid("{515957e3-8354-4048-8d6c-98628ef21804}");
static const AZ::Uuid EditorEmitterComponentTypeId = AZ::Uuid("{B62ED02E-731B-4ACD-BCA1-78EF92528228}");

class PopcornFXProfilerRequests
: public AZ::EBusTraits
Expand Down
2 changes: 1 addition & 1 deletion Code/Platform/Linux/PAL_linux.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
#----------------------------------------------------------------------------

set(LY_PACKAGE_SERVER_URLS ${LY_PACKAGE_SERVER_URLS} "https://downloads.popcornfx.com/o3de-packages")
ly_associate_package(PACKAGE_NAME PopcornFX-${POPCORNFX_VERSION}-${POPCORNFX_LICENSE}-linux TARGETS PopcornFX PACKAGE_HASH a6017d358802145c5beface77b3519971805b0a27cd756e492c65c0a42f04792)
ly_associate_package(PACKAGE_NAME PopcornFX-${POPCORNFX_VERSION}-${POPCORNFX_LICENSE}-linux TARGETS PopcornFX PACKAGE_HASH e8034e0a559353d889a54c80abaa181be264e0996aeb1edc1672acde38ff8c94)
set(PAL_TRAIT_POPCORNFX_SUPPORTED TRUE)
2 changes: 1 addition & 1 deletion Code/Platform/Mac/PAL_mac.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
#----------------------------------------------------------------------------

set(LY_PACKAGE_SERVER_URLS ${LY_PACKAGE_SERVER_URLS} "https://downloads.popcornfx.com/o3de-packages")
ly_associate_package(PACKAGE_NAME PopcornFX-${POPCORNFX_VERSION}-${POPCORNFX_LICENSE}-mac TARGETS PopcornFX PACKAGE_HASH 145dcf0b2680efce0da185ba9faf1f36604065e2481e948434d72a43fb65ed80)
ly_associate_package(PACKAGE_NAME PopcornFX-${POPCORNFX_VERSION}-${POPCORNFX_LICENSE}-mac TARGETS PopcornFX PACKAGE_HASH fcba5a5d26791e4d620690a6d3f77305b85ca64e46dd64e35a3e1b147aab8daa)
set(PAL_TRAIT_POPCORNFX_SUPPORTED TRUE)
2 changes: 1 addition & 1 deletion Code/Platform/Windows/PAL_windows.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
#----------------------------------------------------------------------------

set(LY_PACKAGE_SERVER_URLS ${LY_PACKAGE_SERVER_URLS} "https://downloads.popcornfx.com/o3de-packages")
ly_associate_package(PACKAGE_NAME PopcornFX-${POPCORNFX_VERSION}-${POPCORNFX_LICENSE}-windows TARGETS PopcornFX PACKAGE_HASH d89d368ae39f2afa29b490e38de81d39578c56c7e0e86dc63e00f81f23d94a5b)
ly_associate_package(PACKAGE_NAME PopcornFX-${POPCORNFX_VERSION}-${POPCORNFX_LICENSE}-windows TARGETS PopcornFX PACKAGE_HASH b96eb74160e670a52a705085b8b0de5b06677710097b3a380bb1bf04114d27db)
set(PAL_TRAIT_POPCORNFX_SUPPORTED TRUE)
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ namespace PopcornFX {

if (auto *serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
{
serializeContext->ClassDeprecate("PopcornFXEmitterSettings", "{F01BC02D-E58B-44DD-A93E-60398D6E9B0D}");

// Serializer:
serializeContext->Class<PopcornFXEmitterEditorComponent, AzToolsFramework::Components::EditorComponentBase>()
->Version(1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ bool CMeshBatchDrawer::MapBuffers(SRenderContext &ctx, const SRendererBatchDrawP
{
AZ_UNUSED(ctx);
const u32 particleCount = drawPass.m_TotalParticleCount;
const u32 drawRequestsCount = drawPass.m_DrawRequests.Count();
[[maybe_unused]] const u32 drawRequestsCount = drawPass.m_DrawRequests.Count();
CRenderManager *renderManager = m_RenderContext->m_RenderManager;
const CParticleBuffers::SViewIndependent &viewIndependent = GetCurBuffers().m_ViewIndependent;

Expand Down Expand Up @@ -178,7 +178,7 @@ bool CMeshBatchDrawer::EmitDrawCall(SRenderContext &ctx, const SRendererBatchDra

const u32 particleCount = drawPass.m_TotalParticleCount;
const SRendererBatchDrawPass_Mesh_CPUBB *meshDrawPass = static_cast<const SRendererBatchDrawPass_Mesh_CPUBB*>(&drawPass);
const u32 drawRequestsCount = drawPass.m_DrawRequests.Count();
[[maybe_unused]] const u32 drawRequestsCount = drawPass.m_DrawRequests.Count();
const CParticleBuffers::SViewIndependent &viewIndependent = GetCurBuffers().m_ViewIndependent;
const CAtomRendererCache *rendererCache = static_cast<const CAtomRendererCache*>(toEmit.m_RendererCaches.First().Get());

Expand Down
5 changes: 4 additions & 1 deletion Code/Source/PopcornFXSystemComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ namespace PopcornFX {

void PopcornFXSystemComponent::Init()
{
PopcornFXLibrary::InitNodeRegistry(ScriptCanvas::GetNodeRegistry().Get());
if (ScriptCanvas::GetNodeRegistry().IsConstructed())
{
PopcornFXLibrary::InitNodeRegistry(ScriptCanvas::GetNodeRegistry().Get());
}
}

void PopcornFXSystemComponent::Activate()
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# O3DE PopcornFX Plugin

Integrates the **PopcornFX Runtime SDK** into **O3DE** as a Gem.
* **Version:** `v2.13.3`
* **Version:** `v2.13.4`
* **O3DE:** `21.11`, `21.11.2`, `22.05.0`
* **Supported platforms:** `Windows`, `MacOS`, `Linux`, `iOS`, `Android`

Expand Down
4 changes: 2 additions & 2 deletions gem.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"license": "Community",
"license_url": "https://www.popcornfx.com/popcornfx-community-license",
"origin": "Persistant Studios - popcornfx.com",
"version": "2.13.3",
"last_updated": "2022-09-09",
"version": "2.13.4",
"last_updated": "2022-09-30",
"type": "Code",
"summary": "The PopcornFX Gem provides real-time FX solution for particle effects.",
"canonical_tags": [
Expand Down

0 comments on commit fd2011b

Please sign in to comment.