您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
41 行
1.5 KiB
41 行
1.5 KiB
using UnityEngine;
|
|
using System;
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// structure definition
|
|
//-----------------------------------------------------------------------------
|
|
namespace UnityEngine.Experimental.Rendering.HDPipeline
|
|
{
|
|
public class StackLit : RenderPipelineMaterial
|
|
{
|
|
//-----------------------------------------------------------------------------
|
|
// SurfaceData
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// Main structure that store the user data (i.e user input of master node in material graph)
|
|
[GenerateHLSL(PackingRules.Exact, false, true, 1300)]
|
|
public struct SurfaceData
|
|
{
|
|
// Standard
|
|
[SurfaceDataAttributes("Base Color", false, true)]
|
|
public Vector3 baseColor;
|
|
|
|
[SurfaceDataAttributes(new string[]{"Normal", "Normal View Space"}, true)]
|
|
public Vector3 normalWS;
|
|
};
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// BSDFData
|
|
//-----------------------------------------------------------------------------
|
|
|
|
[GenerateHLSL(PackingRules.Exact, false, true, 1400)]
|
|
public struct BSDFData
|
|
{
|
|
[SurfaceDataAttributes("", false, true)]
|
|
public Vector3 diffuseColor;
|
|
|
|
[SurfaceDataAttributes(new string[] { "Normal WS", "Normal View Space" }, true)]
|
|
public Vector3 normalWS;
|
|
};
|
|
}
|
|
}
|