您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
41 行
1.0 KiB
41 行
1.0 KiB
using UnityEngine;
|
|
using UnityEngine.Experimental.Rendering;
|
|
using System;
|
|
|
|
namespace UnityEngine.Experimental.ScriptableRenderLoop
|
|
{
|
|
public class LightLoopSinglePass
|
|
{
|
|
string GetKeyword()
|
|
{
|
|
return "LIGHTLOOP_SINGLE_PASS";
|
|
}
|
|
};
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// structure definition
|
|
//-----------------------------------------------------------------------------
|
|
|
|
[GenerateHLSL]
|
|
public enum ShadowType
|
|
{
|
|
Spot,
|
|
Directional,
|
|
Point
|
|
};
|
|
|
|
// TODO: we may have to add various parameters here for shadow
|
|
// A point light is 6x PunctualShadowData
|
|
[GenerateHLSL]
|
|
public struct PunctualShadowData
|
|
{
|
|
// World to ShadowMap matrix
|
|
// Include scale and bias for shadow atlas if any
|
|
public Matrix4x4 worldToShadow;
|
|
|
|
public ShadowType shadowType;
|
|
public float bias;
|
|
public float quality;
|
|
public Vector2 unused;
|
|
};
|
|
}
|