Files
UnrealEngine/Engine/Shaders/Private/Nanite/NanitePackedNaniteView.ush
2025-05-18 13:04:45 +08:00

60 lines
1.6 KiB
HLSL

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
// Counterpart to Nanite::FPackedView in NaniteShared.h
struct FPackedNaniteView
{
float4x4 SVPositionToTranslatedWorld;
float4x4 ViewToTranslatedWorld;
float4x4 TranslatedWorldToView;
float4x4 TranslatedWorldToClip;
float4x4 ViewToClip;
float4x4 ClipToRelativeWorld;
float4x4 PrevTranslatedWorldToView;
float4x4 PrevTranslatedWorldToClip;
float4x4 PrevViewToClip;
float4x4 PrevClipToRelativeWorld;
int4 ViewRect;
float4 ViewSizeAndInvSize;
float4 ClipSpaceScaleOffset;
float4 MaterialCacheUnwrapMinAndInvSize;
float4 MaterialCachePageAdvanceAndInvCount;
float3 PreViewTranslationHigh;
float ViewOriginHighX;
float3 PrevPreViewTranslationHigh;
float ViewOriginHighY;
float3 PrevPreViewTranslationLow;
float CullingViewMinRadiusTestFactorSq;
float3 ViewOriginLow;
float ViewOriginHighZ;
float3 CullingViewOriginTranslatedWorld;
float RangeBasedCullingDistance;
float3 ViewForward;
float NearPlane;
float4 TranslatedGlobalClipPlane; // Not actually used unless project setting is enabled
float3 PreViewTranslationLow;
float CullingViewScreenMultipleSq;
float2 LODScales;
uint InstanceOcclusionQueryMask;
uint StreamingPriorityCategory_AndFlags;
int4 TargetLayerIdX_AndMipLevelY_AndNumMipLevelsZ;
int4 HZBTestViewRect;
uint4 FirstPersonTransformRowsExceptRow2Z; // Packed into half floats
uint FirstPersonTransformRow2Z;
uint LightingChannelMask;
int SceneRendererPrimaryViewId;
uint Padding1;
float2 DynamicDepthCullRange;
uint2 Padding2;
};