39 lines
1.5 KiB
C#
39 lines
1.5 KiB
C#
using UnityEngine.Rendering.HighDefinition.Attributes;
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// structure definition
|
|
//-----------------------------------------------------------------------------
|
|
namespace UnityEngine.Rendering.HighDefinition
|
|
{
|
|
class Unlit : RenderPipelineMaterial
|
|
{
|
|
//-----------------------------------------------------------------------------
|
|
// SurfaceData
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// Main structure that store the user data (i.e user input of master node in material graph)
|
|
[GenerateHLSL(PackingRules.Exact, false, false, true, 300)]
|
|
public struct SurfaceData
|
|
{
|
|
[MaterialSharedPropertyMapping(MaterialSharedProperty.Albedo)]
|
|
[SurfaceDataAttributes("Color", false, true)]
|
|
public Vector3 color;
|
|
|
|
[MaterialSharedPropertyMapping(MaterialSharedProperty.Normal)]
|
|
[SurfaceDataAttributes(new string[] { "Normal", "Normal View Space" }, true)]
|
|
public Vector3 normalWS;
|
|
};
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// BSDFData
|
|
//-----------------------------------------------------------------------------
|
|
|
|
[GenerateHLSL(PackingRules.Exact, false, false, true, 350)]
|
|
public struct BSDFData
|
|
{
|
|
[SurfaceDataAttributes("", false, true)]
|
|
public Vector3 color;
|
|
};
|
|
}
|
|
}
|