FShader

A compiled shader and its parameter bindings.

Windows
MacOS
Linux

Inheritance Hierarchy

FShader

FGlobalShader

FAYUVConvertPS

FBMPConvertPS

FClearRectPS

FColorCorrectRegionsPostProcessMaterialShader

FColorCorrectRegionMaterialPS

FColorCorrectRegionMaterialVS

FColorCorrectScreenPassVS

FCopyRectPS

FCopyResidentBricksCS

FCopyResidentBrickSHCoefficientsCS

FCopyTexture2DCS

FCopyTextureCS

TCopyResourceCS

FCubemapTexturePropertiesPS

FCubemapTexturePropertiesVS

FFillTextureCS

FHdrCustomResolve2xPS

FHdrCustomResolve4xPS

FHdrCustomResolve8xPS

FHdrCustomResolveFMask2xPS

FHdrCustomResolveFMask4xPS

FHdrCustomResolveFMask8xPS

FHdrCustomResolveVS

FIESLightProfilePS

FLongGPUTaskPS

FMediaShadersVS

FModifyAlphaSwizzleRgbaPS

FMoveWholeIndirectionTextureCS

FNiagaraDrawIndirectArgsGenCS

FNiagaraDrawIndirectResetCountsCS

FNiagaraGPURayTracingTransformsCS

FNiagaraSortKeyGenCS

FNULLPS

FNV12ConvertAsBytesPS

FNV12ConvertPS

FNV21ConvertPS

FOculusAlphaInverseShader

FOculusBlackShader

FOculusCubemapPS

FOculusVertexShader

FOculusWhiteShader

FOneColorPS

TOneColorPixelShaderMRT

FOpenColorIOPixelShader_RDG

FOpenColorIOVertexShader

FPatchIndirectionTextureCS

FPixelShaderUtils::FRasterizeToRectsVS

FReadTextureExternalPS

FRemoveSubLevelBricksCS

FResolveDepth2XPS

FResolveDepth4XPS

FResolveDepth8XPS

FResolveDepthNonMSPS

FResolveDepthPS

FResolveSingleSamplePS

FResolveVS

FRGB10toYUVv210ConvertPS

FRGB8toUYVY8ConvertPS

FRGB8toY8ConvertPS

FRGBConvertPS

FScreenPS

FScreenPS_OSE

FScreenPSInvertAlpha

FScreenPSMipLevel

FScreenPSsRGBSource

FScreenPSsRGBSourceMipLevel

FScreenVertexShaderVS

FScreenVS

FSimpleElementColorChannelMaskPS

FSimpleElementHitProxyPS

FSimpleElementPS

FSimpleElementAlphaOnlyPS

FSimpleElementGammaBasePS

FSimpleElementGammaAlphaOnlyPS

FSimpleElementGammaPS

FSimpleElementMaskedGammaBasePS

FSimpleElementDistanceFieldGammaPS

FSimpleElementMaskedGammaPS

FSimpleElementVS

FStereoLayerPS_Base

FStereoLayerPS

FStereoLayerPS_External

FStereoLayerVS

FUpdateTexture2DSubresouceCS

FUpdateTexture3DSubresouceCS

FUYVYConvertPS

FWmfMediaHardwareVideoDecodingShader

FHardwareVideoDecodingPassThroughPS

FHardwareVideoDecodingPS

FHardwareVideoDecodingVS

FHardwareVideoDecodingY416PS

FWriteToSliceGS

FWriteToSliceVS

FYCbCrConvertPS

FYCbCrConvertPS_4x4Matrix

FYUVConvertPS

FYUVv210ConvertPS

FYUY2ConvertPS

FYVYUConvertPS

RayTracingInstanceCopyCS

TClearReplacementBase

TCopyDataCS

TCopyTexture2DCS

TOneColorVS

TUpdateTexture2DSubresouceCS

FMaterialShader

FMeshMaterialShader

FNiagaraShader

FNiagaraEmitterInstanceShader

FOpenColorIOShader

FOpenColorIOPixelShader

References

Module

RenderCore

Header

/Engine/Source/Runtime/RenderCore/Public/Shader.h

Include

#include "Shader.h"

Syntax

class FShader

Remarks

A compiled shader and its parameter bindings.

Variables

Name Description

Public variable

FShaderParamete...

 

Bindings

Protected variable

FSHAHash

 

OutputHash

Hash of the compiled output from this shader and the resulting parameter map.

Public variable

FShaderParamete...

 

ParameterMapInfo

Protected variable

FSHAHash

 

SourceHash

Hash of this shader's source files generated at compile time, and stored to allow creating an FShaderId.

Protected variable

TMemoryImageArr...

 

UniformBufferParameters

Protected variable

TMemoryImageArr...

 

UniformBufferParameterStructs

Protected variable

FSHAHash

 

VFSourceHash

Vertex factory source hash, stored so that an FShaderId can be constructed from this shader.

Constructors

Name Description

Public function

FShader()

Used to construct a shader for deserialization.

Public function

FShader

(
    const CompiledShaderInitializerType...
)

Construct a shader from shader compiler output.

Destructors

Name Description

Public function

~FShader()

Functions

Name Description

Public function

void

 

DumpDebugInfo

(
    const FShaderMapPointerTable& InPt...
)

Public function

void

 

Finalize

(
    const FShaderMapResourceCode* ...
)

Public function Const

const FShade...

 

FindAutomaticallyBoundUniformBufferStruct

(
    int32 BaseIndex
)

Public function Const

uint32

 

GetCodeSize()

Public function Const

EShaderFrequ...

 

GetFrequency()

Public function Const

const FSHAHa...

 

GetHash()

Returns the hash of the shader file that this shader was compiled with.

Public function Const

uint32

 

GetNumInstructions()

Public function Const

uint32

 

GetNumTextureSamplers()

Public function Const

const FSHAHa...

 

GetOutputHash()

Public function Const

int32

 

GetResourceIndex()

Public function Static

const FShade...

 

GetRootParametersMetadata()

Returns the meta data for the root shader parameter struct.

Public function Const

EShaderPlatf...

 

GetShaderPlatform()

Public function Const

const FShade...

 

GetTarget()

Public function Const

FShaderType ...

 

GetType

(
    const FPointerTableBase* InPoi...
)

Public function Const

FShaderType ...

 

GetType

(
    const FShaderMapPointerTable& InPo...
)

Accessors.

Public function Const

const FTypeL...

 

GetTypeLayout()

Public function Const

FShaderType ...

 

GetTypeUnfrozen()

Public function Const

const FShade...

 

GetUniformBufferParameter

(
    const FHashedName SearchName
)

Finds an automatically bound uniform buffer matching the HashedName if one exists, or returns an unbound parameter.

Public function Const

const FShade...

 

GetUniformBufferParameter

(
    const FShaderParametersMetadata...
)

Finds an automatically bound uniform buffer matching the given uniform buffer struct if one exists, or returns an unbound parameter.

Public function Const

const TShade...

 

GetUniformBufferParameter()

Finds an automatically bound uniform buffer matching the given uniform buffer type if one exists, or returns an unbound parameter.

Public function Const

const FSHAHa...

 

GetVertexFactoryHash()

Public function Const

FVertexFacto...

 

GetVertexFactoryType

(
    const FShaderMapPointerTable& InPo...
)

Public function Const

FVertexFacto...

 

GetVertexFactoryType

(
    const FPointerTableBase* InPoi...
)

Public function Const

bool

 

IsFrozen()

Public function Static

void

 

ModifyCompilationEnvironment

Can be overridden by FShader subclasses to modify their compile environment just before compilation occurs.

Public function

void

 

SaveShaderStableKeys

(
    const FShaderMapPointerTable& InPt...,
    EShaderPlatform TargetShaderPlatfor...,
    int32 PermutationId,
    const FStableShaderKeyAndValue& Sa...
)

Public function

void

 

SetNumInstructions

(
    uint32 Value
)

Public function Static

bool

 

ShouldCompilePermutation

(
    const FShaderPermutationParameters ...
)

Can be overridden by FShader subclasses to determine whether a specific permutation should be compiled.

Public function Static

FTypeLayoutD...

 

StaticGetTypeLayout()

Public function Static

bool

 

ValidateCompiledResult

(
    EShaderPlatform InPlatform,
    const FShaderParameterMap& InParam...,
    TArray< FString >& OutError
)

Can be overridden by FShader subclasses to determine whether compilation is valid.

Classes

Typedefs

Constants

Name

Description

CounterBase

InterfaceType

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss