Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Shaders/Private/ConvertVelocity.usf
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ float3 ComputeStaticVelocity(float2 ScreenPos, float DeviceZ)
Texture2D InputDepth;
Texture2D InputVelocity;

float2 main(float4 SvPosition : SV_POSITION) : SV_Target0
float2 MainPS(float4 SvPosition : SV_POSITION) : SV_Target0
{
uint2 Pos = uint2(SvPosition.xy);
float2 Velocity = 0;
Expand Down
6 changes: 3 additions & 3 deletions Shaders/Private/CreateReactiveMask.usf
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ uint LumenSpecularCurrentFrame;

struct Outputs
{
float ReactiveMask : SV_TARGET0;
float CompositeMask : SV_TARGET1;
float ReactiveMask : SV_Target0;
float CompositeMask : SV_Target1;
};

Outputs main(float4 SvPosition : SV_POSITION)
Outputs MainPS(float4 SvPosition : SV_POSITION)
{
uint2 uPixelCoord = uint2(SvPosition.xy);

Expand Down
24 changes: 12 additions & 12 deletions Shaders/Private/fsr2/ffxm_fsr2_accumulate_pass_fs.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -73,29 +73,29 @@ struct VertexOut
struct AccumulateOutputsFS
{
#if FFXM_FSR2_OPTION_SHADER_OPT_ULTRA_PERFORMANCE
FfxFloat32x3 fUpscaledColor : SV_TARGET0;
FfxFloat32x2 fLockStatus : SV_TARGET1;
FfxFloat32x3 fUpscaledColor : SV_Target0;
FfxFloat32x2 fLockStatus : SV_Target1;
#if FFXM_FSR2_OPTION_APPLY_SHARPENING == 0
FfxFloat32x3 fColor : SV_TARGET2;
FfxFloat32x3 fColor : SV_Target2;
#endif
#elif !FFXM_SHADER_QUALITY_BALANCED_OR_PERFORMANCE
FfxFloat32x4 fColorAndWeight : SV_TARGET0;
FfxFloat32x2 fLockStatus : SV_TARGET1;
FfxFloat32x4 fLumaHistory : SV_TARGET2;
FfxFloat32x4 fColorAndWeight : SV_Target0;
FfxFloat32x2 fLockStatus : SV_Target1;
FfxFloat32x4 fLumaHistory : SV_Target2;
#if FFXM_FSR2_OPTION_APPLY_SHARPENING == 0
FfxFloat32x3 fColor : SV_TARGET3;
FfxFloat32x3 fColor : SV_Target3;
#endif
#else // FFXM_SHADER_QUALITY_BALANCED_OR_PERFORMANCE
FfxFloat32x3 fUpscaledColor : SV_TARGET0;
FfxFloat32 fTemporalReactive : SV_TARGET1;
FfxFloat32x2 fLockStatus : SV_TARGET2;
FfxFloat32x3 fUpscaledColor : SV_Target0;
FfxFloat32 fTemporalReactive : SV_Target1;
FfxFloat32x2 fLockStatus : SV_Target2;
#if FFXM_FSR2_OPTION_APPLY_SHARPENING == 0
FfxFloat32x3 fColor : SV_TARGET3;
FfxFloat32x3 fColor : SV_Target3;
#endif
#endif
};

AccumulateOutputsFS main(float4 SvPosition : SV_POSITION)
AccumulateOutputsFS MainPS(float4 SvPosition : SV_POSITION)
{
uint2 uPixelCoord = uint2(SvPosition.xy);
AccumulateOutputs result = Accumulate(uPixelCoord);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

struct GenReactiveMaskOutputs
{
FfxFloat32 fReactiveMask : SV_TARGET0;
FfxFloat32 fReactiveMask : SV_Target0;
};

struct VertexOut
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
FFXM_PREFER_WAVE64
FFXM_FSR2_NUM_THREADS
FFXM_FSR2_EMBED_CB2_ROOTSIG_CONTENT
void main(uint3 WorkGroupId : SV_GroupID, uint LocalThreadIndex : SV_GroupIndex)
void MainCS(uint3 WorkGroupId : SV_GroupID, uint LocalThreadIndex : SV_GroupIndex)
{
ComputeAutoExposure(WorkGroupId, LocalThreadIndex);
}
6 changes: 3 additions & 3 deletions Shaders/Private/fsr2/ffxm_fsr2_depth_clip_pass_fs.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ struct VertexOut

struct DepthClipOutputsFS
{
FfxFloat32x2 fDilatedReactiveMasks : SV_TARGET0;
FfxFloat32x2 fDilatedReactiveMasks : SV_Target0;
#if !FFXM_FSR2_OPTION_SHADER_OPT_ULTRA_PERFORMANCE
FfxFloat32x4 fTonemapped : SV_TARGET1;
FfxFloat32x4 fTonemapped : SV_Target1;
#endif
};

DepthClipOutputsFS main(float4 SvPosition : SV_POSITION)
DepthClipOutputsFS MainPS(float4 SvPosition : SV_POSITION)
{
uint2 uPixelCoord = uint2(SvPosition.xy);
DepthClipOutputs result = DepthClip(uPixelCoord);
Expand Down
2 changes: 1 addition & 1 deletion Shaders/Private/fsr2/ffxm_fsr2_lock_pass.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
FFXM_PREFER_WAVE64
FFXM_FSR2_NUM_THREADS
FFXM_FSR2_EMBED_ROOTSIG_CONTENT
void main(uint2 uGroupId : SV_GroupID, uint2 uGroupThreadId : SV_GroupThreadID)
void MainCS(uint2 uGroupId : SV_GroupID, uint2 uGroupThreadId : SV_GroupThreadID)
{
uint2 uDispatchThreadId = uGroupId * uint2(FFXM_FSR2_THREAD_GROUP_WIDTH, FFXM_FSR2_THREAD_GROUP_HEIGHT) + uGroupThreadId;

Expand Down
4 changes: 2 additions & 2 deletions Shaders/Private/fsr2/ffxm_fsr2_rcas_pass_fs.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ struct VertexOut

struct RCASOutputsFS
{
FfxFloat32x3 fUpscaledColor : SV_TARGET0;
FfxFloat32x3 fUpscaledColor : SV_Target0;
};

RCASOutputsFS main(float4 SvPosition : SV_POSITION)
RCASOutputsFS MainPS(float4 SvPosition : SV_POSITION)
{
uint2 uPixelCoord = uint2(SvPosition.xy);
RCASOutputs result = RCAS(uPixelCoord);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,16 @@ struct VertexOut
struct ReconstructPrevDepthOutputsFS
{
#if FFXM_FSR2_OPTION_SHADER_OPT_ULTRA_PERFORMANCE
FfxFloat32x4 fDepthMotionVectorLuma: SV_TARGET0;
FfxFloat32x4 fDepthMotionVectorLuma: SV_Target0;
#else
FfxFloat32 fDepth : SV_TARGET0;
FfxFloat32x2 fMotionVector : SV_TARGET1;
FfxFloat32 fLuma : SV_TARGET2;
FfxFloat32 fDepth : SV_Target0;
FfxFloat32x2 fMotionVector : SV_Target1;
FfxFloat32 fLuma : SV_Target2;
#endif
};


ReconstructPrevDepthOutputsFS main(float4 SvPosition : SV_POSITION)
ReconstructPrevDepthOutputsFS MainPS(float4 SvPosition : SV_POSITION)
{
uint2 uPixelCoord = uint2(SvPosition.xy);
ReconstructPrevDepthOutputs result = ReconstructAndDilate(uPixelCoord);
Expand Down
4 changes: 2 additions & 2 deletions Source/ArmASR/ArmASR.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ public ArmASR(ReadOnlyTargetRules Target) : base(Target)
"Renderer",
"RenderCore",
"Projects",
"RHI",
"VulkanRHI"
"RHI"
// ... add private dependencies that you statically link with here ...
}
);
Expand All @@ -63,6 +62,7 @@ public ArmASR(ReadOnlyTargetRules Target) : base(Target)
|| Target.IsInPlatformGroup(UnrealPlatformGroup.Android))
{
AddEngineThirdPartyPrivateStaticDependencies(Target, "Vulkan");
AddEngineThirdPartyPrivateStaticDependencies(Target, "VulkanRHI");
}
}
}
20 changes: 12 additions & 8 deletions Source/ArmASR/Private/ArmASR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
#include "ArmASRPassthroughDenoiser.h"
#include "ArmASRSettings.h"

#if PLATFORM_IOS || PLATFORM_MAC
#define ARM_ASR_ENABLE_VK 0
#else
#define ARM_ASR_ENABLE_VK 1
#endif

#if ARM_ASR_ENABLE_VK
#include "IVulkanDynamicRHI.h"
Expand Down Expand Up @@ -148,16 +152,16 @@ TAutoConsoleVariable<int32> CVarArmASRReactiveMaskReactiveShadingModelID(
ECVF_RenderThreadSafe
);

IMPLEMENT_GLOBAL_SHADER(FArmASRAccumulatePS, "/Plugin/ArmASR/Private/AccumulatePass.usf", "main", SF_Pixel);
IMPLEMENT_GLOBAL_SHADER(FArmASRAccumulatePS, "/Plugin/ArmASR/Private/AccumulatePass.usf", "MainPS", SF_Pixel);
IMPLEMENT_GLOBAL_SHADER(FArmASRComputeLuminancePyramidCS, "/Plugin/ArmASR/Private/ComputeLuminancePyramidPass.usf",
"main", SF_Compute);
IMPLEMENT_GLOBAL_SHADER(FArmASRConvertVelocity, "/Plugin/ArmASR/Private/ConvertVelocity.usf", "main", SF_Pixel);
"MainCS", SF_Compute);
IMPLEMENT_GLOBAL_SHADER(FArmASRConvertVelocity, "/Plugin/ArmASR/Private/ConvertVelocity.usf", "MainPS", SF_Pixel);
IMPLEMENT_GLOBAL_SHADER(FArmASRCopyExposureCS, "/Plugin/ArmASR/Private/CopyExposure.usf", "MainCS", SF_Compute);
IMPLEMENT_GLOBAL_SHADER(FArmASRCreateReactiveMaskPS, "/Plugin/ArmASR/Private/CreateReactiveMask.usf", "main", SF_Pixel);
IMPLEMENT_GLOBAL_SHADER(FArmASRDepthClipPS, "/Plugin/ArmASR/Private/DepthClipPass.usf", "main", SF_Pixel);
IMPLEMENT_GLOBAL_SHADER(FArmASRLockCS, "/Plugin/ArmASR/Private/LockPass.usf", "main", SF_Compute);
IMPLEMENT_GLOBAL_SHADER(FArmASRRCASPS, "/Plugin/ArmASR/Private/RCASPass.usf", "main", SF_Pixel);
IMPLEMENT_GLOBAL_SHADER(FArmASRReconstructPrevDepthPS, "/Plugin/ArmASR/Private/ReconstructPrevDepthPass.usf", "main",
IMPLEMENT_GLOBAL_SHADER(FArmASRCreateReactiveMaskPS, "/Plugin/ArmASR/Private/CreateReactiveMask.usf", "MainPS", SF_Pixel);
IMPLEMENT_GLOBAL_SHADER(FArmASRDepthClipPS, "/Plugin/ArmASR/Private/DepthClipPass.usf", "MainPS", SF_Pixel);
IMPLEMENT_GLOBAL_SHADER(FArmASRLockCS, "/Plugin/ArmASR/Private/LockPass.usf", "MainCS", SF_Compute);
IMPLEMENT_GLOBAL_SHADER(FArmASRRCASPS, "/Plugin/ArmASR/Private/RCASPass.usf", "MainPS", SF_Pixel);
IMPLEMENT_GLOBAL_SHADER(FArmASRReconstructPrevDepthPS, "/Plugin/ArmASR/Private/ReconstructPrevDepthPass.usf", "MainPS",
SF_Pixel);

// History written by frame N and read by frame N + 1.
Expand Down