FMaterialShaderType

A shader meta type for material-linked shaders.

Windows
MacOS
Linux

Inheritance Hierarchy

FShaderType

FMaterialShaderType

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Public/MaterialShaderType.h

Include

#include "MaterialShaderType.h"

Syntax

class FMaterialShaderType : public FShaderType

Remarks

A shader meta type for material-linked shaders.

Constructors

Name Description

Public function

FMaterialShaderType

(
    const TCHAR* InName,
    const TCHAR* InSourceFilename,
    const TCHAR* InFunctionName,
    uint32 InFrequency,
    int32 InTotalPermutationCount,
    ConstructSerializedType InConstruct...,
    ConstructCompiledType InConstructCo...,
    ModifyCompilationEnvironmentType In...,
    ShouldCompilePermutationType InShou...,
    ValidateCompiledResultType InValida...,
    GetStreamOutElementsType InGetStrea...
)

Functions

Name Description

Public function

FShaderCompi...

 

BeginCompileShader

(
    uint32 ShaderMapId,
    int32 PermutationId,
    const FMaterial* Material,
    FShaderCompilerEnvironment* Ma...,
    const FShaderPipelineType* Sha...,
    EShaderPlatform Platform,
    TArray< FShaderCommonCompileJob...,
    const FString& DebugDescription,
    const FString& DebugExtension
)

Enqueues a compilation for a new shader of this type.

Public function Static

void

 

BeginCompileShaderPipeline

(
    uint32 ShaderMapId,
    EShaderPlatform Platform,
    const FMaterial* Material,
    FShaderCompilerEnvironment* Ma...,
    const FShaderPipelineType* Sha...,
    const TArray< FMaterialShaderType&...,
    TArray< FShaderCommonCompileJob...,
    const FString& DebugDescription,
    const FString& DebugExtension
)

Public function

FShader *...

 

FinishCompileShader

(
    const FUniformExpressionSet& Unifo...,
    const FSHAHash& MaterialShaderMapH...,
    const FShaderCompileJob& CurrentJo...,
    const FShaderPipelineType* Sha...,
    const FString& InDebugDescription
)

Either creates a new instance of this type or returns an equivalent existing shader.

Protected function

void

 

SetupCompileEnvironment

(
    EShaderPlatform Platform,
    const FMaterial* Material,
    int32 PermutationId,
    FShaderCompilerEnvironment& Enviro...
)

Sets up the environment used to compile an instance of this shader type.

Public function Const

bool

 

ShouldCompilePermutation

(
    EShaderPlatform Platform,
    const FMaterial* Material,
    int32 PermutationId
)

Checks if the shader type should be cached for a particular platform and material.

Public function Const

bool

 

ValidateCompiledResult

(
    EShaderPlatform Platform,
    const TArray< FMaterial* >& M...,
    const FShaderParameterMap& Paramet...,
    TArray< FString >& OutError
)

Checks if the shader type should pass compilation for a particular set of parameters.

Classes

Typedefs

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback