您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
78 行
1.9 KiB
78 行
1.9 KiB
using UnityEngine;
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// structure definition
|
|
//-----------------------------------------------------------------------------
|
|
namespace UnityEngine.ScriptableRenderLoop
|
|
{
|
|
// These structures share between C# and hlsl need to be align on float4, so we pad them.
|
|
[GenerateHLSL]
|
|
public struct PunctualLightData
|
|
{
|
|
public Vector3 positionWS;
|
|
public float invSqrAttenuationRadius;
|
|
|
|
public Vector3 color;
|
|
public float useDistanceAttenuation;
|
|
|
|
public Vector3 forward;
|
|
public float diffuseScale;
|
|
|
|
public Vector3 up;
|
|
public float specularScale;
|
|
|
|
public Vector3 right;
|
|
public float shadowDimmer;
|
|
|
|
public float angleScale;
|
|
public float angleOffset;
|
|
public Vector2 unused2;
|
|
};
|
|
|
|
[GenerateHLSL]
|
|
public struct AreaLightData
|
|
{
|
|
public Vector3 positionWS;
|
|
};
|
|
|
|
[GenerateHLSL]
|
|
public enum EnvShapeType
|
|
{
|
|
None,
|
|
Box,
|
|
Sphere
|
|
};
|
|
|
|
[GenerateHLSL]
|
|
public struct EnvLightData
|
|
{
|
|
public Vector3 positionWS;
|
|
public EnvShapeType shapeType;
|
|
|
|
public Matrix4x4 worldToLocal; // No scale
|
|
|
|
public Vector3 innerDistance;
|
|
public int sliceIndex;
|
|
|
|
public Vector3 capturePointWS;
|
|
public float blendDistance;
|
|
|
|
/*
|
|
volumeWorldToLocal
|
|
shapeType - ENV_BOX_PROJECTED
|
|
innerDistance - vBoxInnerDist
|
|
blendDistance - fProbeBlendDistance
|
|
capturePointWS - vLocalCubeCapturePoint // Caution, not the same space local vs world
|
|
sliceIndex
|
|
light.positionWS
|
|
sphereRadius (i.e innerDistance.x)
|
|
*/
|
|
|
|
};
|
|
|
|
[GenerateHLSL]
|
|
public struct PlanarLightData
|
|
{
|
|
public Vector3 positionWS;
|
|
};
|
|
} // namespace UnityEngine.ScriptableRenderLoop
|