UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
MaterialExpressionShaderStageSwitch.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3
4#pragma once
5
6#include "CoreMinimal.h"
10#include "RHIDefinitions.h"
11#include "MaterialExpressionShaderStageSwitch.generated.h"
12
15{
17
18public:
19
21 {
22 // Compute is considered pixel shader here, as the majority of material behavior that depends on pixel shader also allows compute shader
24 }
25
26 UPROPERTY(meta = (RequiredInput = "true", ToolTip = "Input will be used in pixel (or compute) shader stages"))
28
29 UPROPERTY(meta = (RequiredInput = "true", ToolTip = "Input will be in vertex (or tessellation) shader stages"))
31
32 //~ Begin UMaterialExpression Interface
33#if WITH_EDITOR
34 virtual void Build(MIR::FEmitter& Emitter) override;
35 virtual int32 Compile(class FMaterialCompiler* Compiler, int32 OutputIndex) override;
36 virtual void GetCaption(TArray<FString>& OutCaptions) const override;
37 virtual void GetExpressionToolTip(TArray<FString>& OutToolTip) override;
38 virtual FText GetKeywords() const override { return FText::FromString(TEXT("vertex pixel shader")); }
39
40#endif
41 //~ End UMaterialExpression Interface
42};
#define TEXT(x)
Definition Platform.h:1272
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
return true
Definition ExternalRpcRegistry.cpp:601
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define UCLASS(...)
Definition ObjectMacros.h:776
EShaderFrequency
Definition RHIDefinitions.h:202
@ SF_Compute
Definition RHIDefinitions.h:208
@ SF_Pixel
Definition RHIDefinitions.h:206
Definition MaterialCompiler.h:109
Definition Text.h:385
static CORE_API FText FromString(const ANSICHAR *String)
Definition Text.cpp:1081
Definition Array.h:670
Definition MaterialExpressionShaderStageSwitch.h:15
static bool ShouldUsePixelShaderInput(EShaderFrequency InShaderFrequency)
Definition MaterialExpressionShaderStageSwitch.h:20
UPROPERTY(meta=(RequiredInput="true", ToolTip="Input will be used in pixel (or compute) shader stages")) FExpressionInput PixelShader
Definition MaterialExpression.h:150
Definition MaterialExpressionIO.h:23