Lost_Edge/Source/Lost_EdgeShaders/Public/InteractableScreenCapturerBitMapCS.h

39 lines
1.1 KiB
C++

// Oleg Petruny proprietary.
#pragma once
#include "CoreMinimal.h"
#include "DataDrivenShaderPlatformInfo.h"
#include "GlobalShader.h"
#include "ShaderParameterStruct.h"
class LOST_EDGESHADERS_API FInteractableScreenCapturerBitMapCS : public FGlobalShader
{
public:
DECLARE_GLOBAL_SHADER(FInteractableScreenCapturerBitMapCS);
SHADER_USE_PARAMETER_STRUCT(FInteractableScreenCapturerBitMapCS, FGlobalShader);
BEGIN_SHADER_PARAMETER_STRUCT(FParameters, )
SHADER_PARAMETER_SRV(Buffer<uint>, Input)
SHADER_PARAMETER_UAV(RWBuffer<uint>, Output)
END_SHADER_PARAMETER_STRUCT()
public:
static constexpr int32 shader_threads_per_group_count = 64;
static bool ShouldCompilePermutation(const FGlobalShaderPermutationParameters& Parameters)
{
return true;
}
static inline void ModifyCompilationEnvironment(const FGlobalShaderPermutationParameters& Parameters, FShaderCompilerEnvironment& OutEnvironment)
{
FGlobalShader::ModifyCompilationEnvironment(Parameters, OutEnvironment);
OutEnvironment.SetDefine(TEXT("THREADGROUPSIZE_X"), shader_threads_per_group_count);
}
};