Files
UnrealEngineUWP/Engine/Source/Editor/UnrealEd/Public/Texture2DPreview.h
henrik karlsson efe504aa6b [UnrealEd]
* Moved dll export from type to methods/statics

#rb none

[CL 25904988 by henrik karlsson in ue5-main branch]
2023-06-09 17:15:53 -04:00

51 lines
1.8 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
/*==============================================================================
Texture2DPreview.h: Definitions for previewing 2d textures.
==============================================================================*/
#pragma once
#include "CoreMinimal.h"
#include "BatchedElements.h"
/**
* Batched element parameters for previewing 2d textures.
*/
class FBatchedElementTexture2DPreviewParameters : public FBatchedElementParameters
{
public:
FBatchedElementTexture2DPreviewParameters(float InMipLevel, float InLayerIndex, float InSliceIndex, bool bInIsNormalMap, bool bInIsSingleChannel, bool bInIsSingleVTPhysicalSpace, bool bInIsVirtualTexture, bool bInIsTextureArray, bool bInUsePointSampling)
: MipLevel(InMipLevel)
, LayerIndex(InLayerIndex)
, SliceIndex(InSliceIndex)
, bIsNormalMap( bInIsNormalMap )
, bIsSingleChannelFormat( bInIsSingleChannel )
, bIsSingleVTPhysicalSpace(bInIsSingleVTPhysicalSpace)
, bIsVirtualTexture(bInIsVirtualTexture)
, bIsTextureArray(bInIsTextureArray)
, bUsePointSampling(bInUsePointSampling)
{
}
/** Binds vertex and pixel shaders for this element */
UNREALED_API virtual void BindShaders(FRHICommandList& RHICmdList, FGraphicsPipelineStateInitializer& GraphicsPSOInit, ERHIFeatureLevel::Type InFeatureLevel, const FMatrix& InTransform, const float InGamma, const FMatrix& ColorWeights, const FTexture* Texture) override;
private:
/** Parameters that need to be passed to the shader */
float MipLevel;
float LayerIndex;
float SliceIndex;
bool bIsNormalMap;
bool bIsSingleChannelFormat;
bool bIsSingleVTPhysicalSpace;
/** Parameters that are used to select a shader permutation */
bool bIsVirtualTexture;
bool bIsTextureArray;
/** Whether to use nearest-point sampling when rendering the texture */
bool bUsePointSampling;
};