FMaterialShader

Base class of all shaders that need material parameters.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Renderer

Header

/Engine/Source/Runtime/Renderer/Public/MaterialShader.h

Include

#include "MaterialShader.h"

Syntax

class FMaterialShader : public FShader

Remarks

Base class of all shaders that need material parameters.

Variables

Name Description

Protected variable

FSceneTextureSh...

 

SceneTextureParameters

Constructors

Functions

Name Description

Public function Static

FShader *...

 

ConstructCompiledInstance

(
    const ShaderMetaType::CompiledShade...
)

Public function Static

FShader *...

 

ConstructSerializedInstance()

Public function Const

FRHIUniformB...

 

GetParameterCollectionBuffer

(
    const FGuid& Id,
    const FSceneInterface* SceneIn...
)

Public function Const

void

 

GetShaderBindings

(
    const FScene* Scene,
    ERHIFeatureLevel::Type FeatureLevel,
    const FMaterialRenderProxy& Materi...,
    const FMaterial& Material,
    FMeshDrawSingleShaderBindings& Sha...
)

Public function Static

void

 

ModifyCompilationEnvironment

(
    const FMaterialShaderPermutationPar...,
    FShaderCompilerEnvironment& OutEnv...
)

Public function Static

void

 

ModifyCompilationEnvironment

(
    EShaderPlatform Platform,
    FShaderCompilerEnvironment& OutEnv...
)

Public function

void

 

SetParameters

(
    FRHICommandList& RHICmdList,
    TRHIShader* ShaderRHI,
    const FMaterialRenderProxy* Ma...,
    const FMaterial& Material,
    const FSceneView& View,
    const TUniformBufferRef< FViewUnifo...,
    ESceneTextureSetupMode SceneTexture...
)

Sets pixel parameters that are material specific but not FMeshBatch specific.

Public function

void

 

SetParametersInner

(
    FRHICommandList& RHICmdList,
    TRHIShader* ShaderRHI,
    const FMaterialRenderProxy* Ma...,
    const FMaterial& Material,
    const FSceneView& View
)

Sets pixel parameters that are material specific but not FMeshBatch specific.

Public function

void

 

SetViewParameters

(
    FRHICommandList& RHICmdList,
    const ShaderRHIParamRef ShaderRHI,
    const FSceneView& View,
    const TUniformBufferRef< FViewUnifo...
)

Public function Static

bool

 

ValidateCompiledResult

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

Overridden from FShader

Name Description

Public function Virtual Const

uint32

 

GetAllocatedSize()

Returns the size of all allocations owned by this shader, e.g. TArrays.

Public function Virtual Const

uint32

 

GetTypeSize()

Returns the size of the concrete type of this shader.

Public function Virtual

bool

 

Serialize

(
    FArchive& Ar
)

Typedefs

Constants

Name

Description

bAllowCachedUniformExpressions

If true, cached uniform expressions are allowed.

CVarAllowCachedUniformExpressions

Console variable ref to toggle cached uniform expressions.

StaticType

UniformBufferLayoutName

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