UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
SimpleElementShaders.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3/*==============================================================================
4 SimpleElementShaders.h: Definitions for simple element shaders.
5==============================================================================*/
6
7#pragma once
8
9#include "CoreMinimal.h"
10#include "ShaderParameters.h"
11#include "Shader.h"
12#include "GlobalShader.h"
13#include "SceneTypes.h"
14#include "Engine/EngineTypes.h"
16
17class FSceneView;
19
43
69
81
99
100template <bool bSRGBTexture>
102{
104public:
107
109 {
110 // SRGB_INPUT_TEXTURE is now ignored, this has no effect
111 // input texture gamma correction is done automatically by the sampler, controlled by TexCreate_SRGB
112 OutEnvironment.SetDefine(TEXT("SRGB_INPUT_TEXTURE"), bSRGBTexture);
113 }
114};
115
126
143
144template <bool bSRGBTexture>
157
215
234
264
#define TEXT(x)
Definition Platform.h:1272
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define DECLARE_EXPORTED_GLOBAL_SHADER(ShaderClass, RequiredAPI)
Definition GlobalShader.h:409
#define LAYOUT_FIELD(T, Name,...)
Definition MemoryLayout.h:471
#define DECLARE_TYPE_LAYOUT(T, Interface)
Definition MemoryLayout.h:557
ESimpleElementBlendMode
Definition SceneTypes.h:191
#define DECLARE_SHADER_TYPE(ShaderClass, ShaderMetaTypeShortcut,...)
Definition Shader.h:1688
FSimpleElementMaskedGammaPS< true > FSimpleElementMaskedGammaPS_SRGB
Definition SimpleElementShaders.h:267
FSimpleElementMaskedGammaPS< false > FSimpleElementMaskedGammaPS_Linear
Definition SimpleElementShaders.h:268
FSimpleElementGammaPS< true > FSimpleElementGammaPS_SRGB
Definition SimpleElementShaders.h:265
FSimpleElementGammaPS< false > FSimpleElementGammaPS_Linear
Definition SimpleElementShaders.h:266
Definition GlobalShader.h:269
Definition SceneView.h:1425
Definition ShaderParameters.h:56
Definition ShaderParameters.h:87
Definition SimpleElementShaders.h:74
FSimpleElementAlphaOnlyPS()
Definition SimpleElementShaders.h:79
Definition SimpleElementShaders.h:241
FSimpleElementColorChannelMaskPS()
Definition SimpleElementShaders.h:245
static bool ShouldCompilePermutation(const FGlobalShaderPermutationParameters &Parameters)
Definition SimpleElementShaders.cpp:232
void SetParameters(FRHIBatchedShaderParameters &BatchedParameters, const FTexture *TextureValue, const FMatrix &ColorWeightsValue, float GammaValue)
Definition SimpleElementShaders.cpp:237
Definition SimpleElementShaders.h:162
FSimpleElementDistanceFieldGammaPS()
Definition SimpleElementShaders.h:166
void SetParameters(FRHIBatchedShaderParameters &BatchedParameters, const FTexture *Texture, float Gamma, float ClipRef, float SmoothWidthValue, bool EnableShadowValue, const FVector2D &ShadowDirectionValue, const FLinearColor &ShadowColorValue, float ShadowSmoothWidthValue, const FDepthFieldGlowInfo &GlowInfo, ESimpleElementBlendMode BlendMode)
Definition SimpleElementShaders.cpp:149
Definition SimpleElementShaders.h:120
FSimpleElementGammaAlphaOnlyPS(const ShaderMetaType::CompiledShaderInitializerType &Initializer)
Definition SimpleElementShaders.h:123
FSimpleElementGammaAlphaOnlyPS()
Definition SimpleElementShaders.h:124
Definition SimpleElementShaders.h:86
FSimpleElementGammaBasePS()
Definition SimpleElementShaders.h:91
void SetParameters(FRHIBatchedShaderParameters &BatchedParameters, const FTexture *Texture, float GammaValue, ESimpleElementBlendMode BlendMode)
Definition SimpleElementShaders.cpp:100
Definition SimpleElementShaders.h:102
FSimpleElementGammaPS()
Definition SimpleElementShaders.h:106
static void ModifyCompilationEnvironment(const FGlobalShaderPermutationParameters &Parameters, FShaderCompilerEnvironment &OutEnvironment)
Definition SimpleElementShaders.h:108
FSimpleElementGammaPS(const ShaderMetaType::CompiledShaderInitializerType &Initializer)
Definition SimpleElementShaders.h:105
Definition SimpleElementShaders.h:220
FSimpleElementHitProxyPS()
Definition SimpleElementShaders.h:224
static bool ShouldCompilePermutation(const FGlobalShaderPermutationParameters &Parameters)
Definition SimpleElementShaders.cpp:213
void SetParameters(FRHIBatchedShaderParameters &BatchedParameters, const FTexture *TextureValue)
Definition SimpleElementShaders.cpp:218
Definition SimpleElementShaders.h:131
FSimpleElementMaskedGammaBasePS()
Definition SimpleElementShaders.h:135
void SetParameters(FRHIBatchedShaderParameters &BatchedParameters, const FTexture *Texture, float Gamma, float ClipRefValue, ESimpleElementBlendMode BlendMode)
Definition SimpleElementShaders.cpp:118
Definition SimpleElementShaders.h:146
FSimpleElementMaskedGammaPS(const ShaderMetaType::CompiledShaderInitializerType &Initializer)
Definition SimpleElementShaders.h:149
static void ModifyCompilationEnvironment(const FGlobalShaderPermutationParameters &Parameters, FShaderCompilerEnvironment &OutEnvironment)
Definition SimpleElementShaders.h:152
FSimpleElementMaskedGammaPS()
Definition SimpleElementShaders.h:150
Definition SimpleElementShaders.h:49
FSimpleElementPS()
Definition SimpleElementShaders.h:53
void SetParameters(FRHIBatchedShaderParameters &BatchedParameters, const FTexture *TextureValue)
Definition SimpleElementShaders.cpp:75
void SetEditorCompositingParameters(FRHIBatchedShaderParameters &BatchedParameters, const FSceneView *View)
Definition SimpleElementShaders.cpp:62
Definition SimpleElementShaders.h:24
static void ModifyCompilationEnvironment(const FGlobalShaderPermutationParameters &Parameters, FShaderCompilerEnvironment &OutEnvironment)
Definition SimpleElementShaders.cpp:43
ENGINE_API void SetParameters(FRHIBatchedShaderParameters &BatchedParameters, const FMatrix &WorldToClipMatrix)
Definition SimpleElementShaders.cpp:27
FSimpleElementVS()
Definition SimpleElementShaders.h:28
void SetParameters(FRHIBatchedShaderParameters &BatchedParameters, const FDFRelativeViewMatrices &Matrices)
Definition SimpleElementShaders.h:32
Definition RenderResource.h:354
Definition SceneRelativeViewMatrices.h:44
Definition EngineTypes.h:4031
Definition GlobalShader.h:73
Definition Color.h:48
Definition RHIShaderParameters.h:241
Definition Shader.h:1610
Definition ShaderCore.h:544