UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
SpecularProfile.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#pragma once
3
4#include "CoreMinimal.h"
6#include "UObject/Object.h"
7#include "Misc/Guid.h"
8#include "RenderResource.h"
10#include "SpecularProfile.generated.h"
11
12#define MAX_SPECULAR_PROFILE_COUNT 256
13
14class UTexture2D;
15class FRDGBuilder;
17
19UENUM(BlueprintType)
21{
22 ViewLightVector UMETA(DisplayName = "View / Light", ToolTip="The specular LUT will be sampled based on NoV (angle between the Normal and View direction) for the view color axis and NoL (angle between the Normal and Light direction) for the light color axis."),
23 HalfVector UMETA(DisplayName = "Half Angle", ToolTip = "The specular LUT will be sampled based on VoH (angle between the View and the Half vector) for the view color axis and NoH (angle between the Normal and the Half vector) for the light color axis."),
24};
25
26// struct with all the settings we want in USpecularProfile, separate to make it easer to pass this data around in the engine.
27USTRUCT(BlueprintType)
29{
31
32
35 UPROPERTY(Category = "Common", EditAnywhere, BlueprintReadOnly, meta=(DisplayName="LUT Format"))
37
42 UPROPERTY(Category = "Procedural", EditAnywhere, meta = (AllowZoomOutput = "false", ShowZoomButtons = "false", ViewMinInput = "0", ViewMaxInput = "1", ViewMinOutput = "0", ViewMaxOutput = "1", TimelineLength = "1", ShowInputGridNumbers="false", ShowOutputGridNumbers="false"))
44
49 UPROPERTY(Category = "Procedural", EditAnywhere, meta = (AllowZoomOutput = "false", ShowZoomButtons = "false", ViewMinInput = "0", ViewMaxInput = "1", ViewMinOutput = "0", ViewMaxOutput = "1", TimelineLength = "1", ShowInputGridNumbers="false", ShowOutputGridNumbers="false"))
51
55 UPROPERTY(Category ="Texture", EditAnywhere, BlueprintReadOnly, meta=(DisplayName="Texture"))
57
59
60 bool IsProcedural() const { return Texture == nullptr; }
61
63 {
64 *this = FSpecularProfileStruct();
65 }
66};
67
74{
76
77 UPROPERTY(Category = USpecularProfile, EditAnywhere, meta = (ShowOnlyInnerProperties))
78 struct FSpecularProfileStruct Settings;
79
80 UPROPERTY()
81 FGuid Guid;
82
83 //~ Begin UObject Interface
84 virtual void BeginDestroy();
85 virtual void PostEditChangeProperty(struct FPropertyChangedEvent& PropertyChangedEvent);
86 virtual void PostDuplicate(EDuplicateMode::Type DuplicateMode);
87 //~ End UObject Interface
88};
89
91{
92// Atlas - Initializes or updates the contents of the specular profile texture.
93ENGINE_API void UpdateSpecularProfileTextureAtlas(FRDGBuilder& GraphBuilder, EShaderPlatform ShaderPlatform);
94
95// Atlas - Returns the specular profile texture if it exists, or null.
96ENGINE_API FRHITexture* GetSpecularProfileTextureAtlas();
97
98// Atlas - Returns the specular profile texture if it exists, or black.
99ENGINE_API FRHITexture* GetSpecularProfileTextureAtlasWithFallback();
100
101// Profile - Initializes or updates the contents of the specular profile texture.
103
104// Profile - Returns the specular profile ID shader parameter name
105ENGINE_API FName GetSpecularProfileParameterName(const USpecularProfile* InProfile);
106
107// Profile - Returns the specular profile ID for a given Specular Profile object
108ENGINE_API float GetSpecularProfileId(const USpecularProfile* In);
109
110// Profile - Returns the shader parameter name for a Specular profile.
111ENGINE_API FName CreateSpecularProfileParameterName(USpecularProfile* InProfile);
112}
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
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_UCLASS_BODY(...)
Definition ObjectMacros.h:768
#define UCLASS(...)
Definition ObjectMacros.h:776
#define UENUM(...)
Definition ObjectMacros.h:749
#define USTRUCT(...)
Definition ObjectMacros.h:746
#define GENERATED_USTRUCT_BODY(...)
Definition ObjectMacros.h:767
EShaderPlatform
Definition RHIShaderPlatform.h:11
ESpecularProfileFormat
Definition SpecularProfile.h:21
uint8_t uint8
Definition binka_ue_file_header.h:8
Definition NameTypes.h:617
Definition RenderGraphBuilder.h:49
Definition RHIResources.h:2153
Definition RenderResource.h:435
Definition Object.h:95
Definition SpecularProfile.h:74
Definition Texture2D.h:26
Type
Definition UObjectGlobals.h:128
Definition SpecularProfile.h:91
@ false
Definition radaudio_common.h:23
Definition Guid.h:109
Definition UnrealType.h:6865
Definition CurveLinearColor.h:15
Definition SpecularProfile.h:29
void Invalidate()
Definition SpecularProfile.h:62
Definition ObjectPtr.h:488