Files
UnrealEngine/Engine/Shaders/Private/Nanite/NanitePackedNaniteView.ush
Brandyn / Techy fcc1b09210 init
2026-04-04 15:40:51 -05:00

62 lines
1.7 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 MaterialCachePageOffsetAndInvSize;
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
float3 PrevPreViewTranslationHZBHigh;
uint FirstPersonTransformRow2Z;
float3 PrevPreViewTranslationHZBLow;
uint PrevFirstPersonTransformRow2Z;
uint4 PrevFirstPersonTransformRowsExceptRow2Z; // Packed into half floats
float2 DynamicDepthCullRange;
uint LightingChannelMask;
int SceneRendererPrimaryViewId;
};