Files
UnrealEngineUWP/Engine/Shaders/Shared/LightSceneData.h
wouter dek ef282833ce Fix warning about unbalanced scope depth
#preflight 63e106a3244dc45a20d951ed
#rb none

[CL 24029390 by wouter dek in ue5-main branch]
2023-02-06 09:15:50 -05:00

76 lines
1.6 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#ifdef __cplusplus
#include "HLSLTypeAliases.h"
namespace UE::HLSL
{
#endif
#ifndef __cplusplus //HLSL
#include "/Engine/Private/LargeWorldCoordinates.ush"
#endif
/**
* Has a 1:1 mapping with FLightRenderParameters, but unlike FLightShaderParameters, this is view-independent
*/
struct FLightSceneData
{
// Position of the light in world space.
FLWCVector3 WorldPosition;
// 1 / light's falloff radius from Position.
float InvRadius;
// Color of the light.
float4 Color;
// The exponent for the falloff of the light intensity from the distance.
float FalloffExponent;
// Direction of the light if applies.
float3 Direction;
// Factor to applies on the specular.
float SpecularScale;
// One tangent of the light if applies.
// Note: BiTangent is on purpose not stored for memory optimisation purposes.
float3 Tangent;
// Radius of the point light.
float SourceRadius;
// Dimensions of the light, for spot light, but also
float2 SpotAngles;
// Radius of the soft source.
float SoftSourceRadius;
// Other dimensions of the light source for rect light specifically.
float SourceLength;
// Barn door angle for rect light
float RectLightBarnCosAngle;
// Barn door length for rect light
float RectLightBarnLength;
// Rect. light atlas transformation
float2 RectLightAtlasUVOffset;
float2 RectLightAtlasUVScale;
float RectLightAtlasMaxLevel;
float InverseExposureBlend;
// Extra fields
uint LightTypeAndShadowMapChannelMaskPacked;
};
#ifdef __cplusplus
} // namespace
using FLightSceneData = UE::HLSL::FLightSceneData;
#endif