ECompilerFlags

Windows
MacOS
Linux

References

Module

RenderCore

Header

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

Include

#include "ShaderCore.h"

Syntax

enum ECompilerFlags
{
    CFLAG_PreferFlowControl                 = 0,
    CFLAG_Debug,
    CFLAG_AvoidFlowControl,
    CFLAG_SkipValidation,
    CFLAG_StandardOptimization,
    CFLAG_ForceOptimization,
    CFLAG_OnChip,
    CFLAG_KeepDebugInfo,
    CFLAG_NoFastMath,
    CFLAG_ZeroInitialise,
    CFLAG_BoundsChecking,
    CFLAG_FeatureLevelES31,
    CFLAG_ForceRemoveUnusedInterpolators,
    CFLAG_UseFullPrecisionInPS,
    CFLAG_VertexToGeometryShader,
    CFLAG_VertexToPrimitiveShader,
    CFLAG_Archive,
    CFLAG_UsesExternalTexture,
    CFLAG_UseEmulatedUB,
    CFLAG_WaveOperations,
    CFLAG_ForceDXC,
    CFLAG_SkipOptimizations,
    CFLAG_SkipOptimizationsDXC,
}

Values

Name

Description

CFLAG_PreferFlowControl

CFLAG_Debug

CFLAG_AvoidFlowControl

CFLAG_SkipValidation

Disable shader validation.

CFLAG_StandardOptimization

Only allows standard optimizations, not the longest compile times.

CFLAG_ForceOptimization

Always optimize, even when CFLAG_Debug is set. Required for some complex shaders and features.

CFLAG_OnChip

Shader should use on chip memory instead of main memory ring buffer memory.

CFLAG_KeepDebugInfo

CFLAG_NoFastMath

CFLAG_ZeroInitialise

Explicitly enforce zero initialization on shader platforms that may omit it.

CFLAG_BoundsChecking

Explicitly enforce bounds checking on shader platforms that may omit it.

CFLAG_FeatureLevelES31

Compile ES2 with ES3.1 features.

CFLAG_ForceRemoveUnusedInterpolators

Force removing unused interpolators for platforms that can opt out.

CFLAG_UseFullPrecisionInPS

Set default precision to highp in a pixel shader (default is mediump on ES2 platforms)

CFLAG_VertexToGeometryShader

Hint that it is a vertex to geometry shader.

CFLAG_VertexToPrimitiveShader

Hint that it is a vertex to primitive shader.

CFLAG_Archive

Prepare the shader for archiving in the native binary shader cache format.

CFLAG_UsesExternalTexture

Shaders uses external texture so may need special runtime handling.

CFLAG_UseEmulatedUB

Use emulated uniform buffers on supported platforms.

CFLAG_WaveOperations

Enable wave operation intrinsics (requires DX12 and DXC/DXIL on PC).

CFLAG_ForceDXC

Use DirectX Shader Compiler (DXC) to compile all shaders, intended for compatibility testing.

CFLAG_SkipOptimizations

CFLAG_SkipOptimizationsDXC

Temporarily disable optimizations with DXC compiler only, intended to workaround shader compiler bugs until they can be resolved with 1st party.

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