You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rnx #ROBOMERGE-AUTHOR: jonathan.bard #ROBOMERGE-SOURCE: CL 20103990 via CL 20104044 via CL 20104071 #ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690) [CL 20109734 by jonathan bard in ue5-main branch]
62 lines
1.3 KiB
C++
62 lines
1.3 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "UObject/ObjectMacros.h"
|
|
#include "Materials/MaterialInstanceConstant.h"
|
|
#include "LandscapeMaterialInstanceConstant.generated.h"
|
|
|
|
USTRUCT()
|
|
struct FLandscapeMaterialTextureStreamingInfo
|
|
{
|
|
GENERATED_USTRUCT_BODY()
|
|
|
|
FLandscapeMaterialTextureStreamingInfo()
|
|
: TexelFactor(0.0f)
|
|
{}
|
|
|
|
UPROPERTY()
|
|
FName TextureName;
|
|
|
|
UPROPERTY()
|
|
float TexelFactor;
|
|
};
|
|
|
|
UCLASS(MinimalAPI)
|
|
class ULandscapeMaterialInstanceConstant : public UMaterialInstanceConstant
|
|
{
|
|
GENERATED_UCLASS_BODY()
|
|
|
|
UPROPERTY()
|
|
TArray<FLandscapeMaterialTextureStreamingInfo> TextureStreamingInfo;
|
|
|
|
UPROPERTY()
|
|
uint32 bIsLayerThumbnail:1;
|
|
|
|
UPROPERTY()
|
|
uint32 bDisableTessellation_DEPRECATED:1;
|
|
|
|
UPROPERTY()
|
|
uint32 bMobile:1;
|
|
|
|
UPROPERTY()
|
|
uint32 bEditorToolUsage:1;
|
|
|
|
virtual void PostLoad() override;
|
|
#if WITH_EDITOR
|
|
virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
|
|
#endif
|
|
virtual FMaterialResource* AllocatePermutationResource() override;
|
|
virtual bool HasOverridenBaseProperties() const override;
|
|
|
|
#if WITH_EDITOR
|
|
FLandscapeMaterialTextureStreamingInfo& AcquireTextureStreamingInfo(const FName& TextureName);
|
|
void UpdateCachedTextureStreaming();
|
|
#endif
|
|
|
|
public:
|
|
float GetLandscapeTexelFactor(const FName& TextureName) const;
|
|
};
|
|
|