FShaderCodeLibrary

Collection of unique shader code Populated at cook time

Windows
MacOS
Linux

References

Module

RenderCore

Header

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

Include

#include "ShaderCodeLibrary.h"

Syntax

struct FShaderCodeLibrary

Remarks

Collection of unique shader code Populated at cook time

Functions

Name Description

Public function Static

void

 

AddKnownChunkIDs

(
    const int32* IDs,
    const int32 NumChunkIDs
)

Makes a number of ChunkIDs known to the library.

Public function Static

void

 

CloseLibrary

(
    FString const& Name
)

Close a named library.

Public function Static

bool

 

ContainsShaderCode

(
    const FSHAHash& Hash
)

Public function Static

FComputeShad...

 

CreateComputeShader

(
    EShaderPlatform Platform,
    const FSHAHash& Hash
)

Public function Static

FDomainShade...

 

CreateDomainShader

(
    EShaderPlatform Platform,
    const FSHAHash& Hash
)

Public function Static

FGeometrySha...

 

CreateGeometryShader

(
    EShaderPlatform Platform,
    const FSHAHash& Hash
)

Public function Static

FHullShaderR...

 

CreateHullShader

(
    EShaderPlatform Platform,
    const FSHAHash& Hash
)

Public function Static

FPixelShader...

 

CreatePixelShader

(
    EShaderPlatform Platform,
    const FSHAHash& Hash
)

Public function Static

FRayTracingS...

 

CreateRayTracingShader

(
    EShaderPlatform Platform,
    const FSHAHash& Hash,
    EShaderFrequency Frequency
)

Public function Static

FVertexShade...

 

CreateVertexShader

(
    EShaderPlatform Platform,
    const FSHAHash& Hash
)

Public function Static

EShaderPlatf...

 

GetRuntimeShaderPlatform()

The shader platform that the library manages - at runtime this will only be one.

Public function Static

uint32

 

GetShaderCount()

Total number of shader entries in the library.

Public function Static

void

 

InitForRuntime

(
    EShaderPlatform ShaderPlatform
)

This is the real initialization function.

Public function Static

bool

 

IsEnabled()

Public function Static

TRefCountPtr...

 

LoadResource

(
    const FSHAHash& Hash,
    FArchive* Ar
)

Public function Static

bool

 

OpenLibrary

(
    FString const& Name,
    FString const& Directory
)

Open a named library.

At runtime this will open the shader library with this name.

Public function Static

void

 

PreInit()

Adds the hooks for OnPakFileMounted, since pak opening normally happens earlier.

Public function Static

bool

 

PreloadShader

(
    const FSHAHash& Hash,
    FArchive* Ar
)

Public function Static

FDelegateHan...

 

RegisterSharedShaderCodeRequestDelegate_Handle

(
    const FSharedShaderCodeRequest::FDe...
)

Delegate called whenever shader code is requested.

Public function Static

void

 

SafeAssignHash

(
    FRHIShader* InShader,
    const FSHAHash& Hash
)

Safely assign the hash to a shader object.

Public function Static

void

 

Shutdown()

Public function Static

void

 

UnregisterSharedShaderCodeRequestDelegate_Handle

(
    FDelegateHandle Handle
)

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