FShaderCompilerEnvironment

The environment used to compile a shader.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

FShaderCompilerEnvironment

FSharedShaderCompilerEnvironment

References

Module

RenderCore

Header

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

Include

#include "ShaderCore.h"

Syntax

struct FShaderCompilerEnvironment

Remarks

The environment used to compile a shader.

Variables

Name Description

Public variable

FShaderCompiler...

 

CompilerFlags

Public variable

bool

 

FullPrecisionInPS

Used for mobile platforms to allow per shader/material precision modes.

Public variable

TMap< FString, ...

 

IncludeVirtualPathToContentsMap

Map of the virtual file path -> content.

Public variable

TMap< FString, ...

 

IncludeVirtualPathToExternalContentsMap

Public variable

TMap< FString, ...

 

RemoteServerData

Public variable

TMap< uint32, u...

 

RenderTargetOutputFormatsMap

Public variable

TMap< FString, ...

 

ResourceTableMap

Public variable

TMap< FString, ...

 

ShaderFormatCVars

Public variable

const ITargetPl...

 

TargetPlatform

Public variable

TMap< FString, ...

 

UniformBufferMap

Constructors

Name Description

Public function

FShaderCompilerEnvironment()

Default constructor.

Public function

FShaderCompilerEnvironment

(
    const FShaderCompilerDefinitions& ...
)

Initialization constructor.

Destructors

Name Description

Public function Virtual

~FShaderCompilerEnvironment()

Used as a baseclasss, make sure we're not incorrectly destroyed through a baseclass pointer This will be expensive to destroy anyway, additional vcall overhead should be small

Functions

Name Description

Public function Const

const TMap< ...

 

GetDefinitions()

Public function

void

 

Merge

(
    const FShaderCompilerEnvironment& ...
)

Public function

void

 

SetDefine

(
    const TCHAR* Name,
    const TCHAR* Value
)

Works for TCHAR e.g. SetDefine(TEXT("NAME"), TEXT("Test")); e.g. SetDefine(TEXT("NUM_SAMPLES"), 1); e.g. SetDefine(TEXT("DOIT"), true);

Public function

void

 

SetDefine

(
    const TCHAR* Name,
    const FString& Value
)

Public function

void

 

SetDefine

(
    const TCHAR* Name,
    uint32 Value
)

Public function

void

 

SetDefine

(
    const TCHAR* Name,
    int32 Value
)

Public function

void

 

SetDefine

(
    const TCHAR* Name,
    bool Value
)

Public function

void

 

SetDefine

(
    const TCHAR* Name,
    float Value
)

Public function

void

 

SetRenderTargetOutputFormat

(
    uint32 RenderTargetIndex,
    EPixelFormat PixelFormat
)