67 lines
1.9 KiB
HLSL
67 lines
1.9 KiB
HLSL
//////////////////////////////////////////////////////
|
|
// MK Toon Meta Data //
|
|
// //
|
|
// Created by Michael Kremmel //
|
|
// www.michaelkremmel.de //
|
|
// Copyright © 2021 All rights reserved. //
|
|
//////////////////////////////////////////////////////
|
|
|
|
#ifndef MK_TOON_META_IO
|
|
#define MK_TOON_META_IO
|
|
|
|
#ifndef UNITY_PASS_META
|
|
#define UNITY_PASS_META
|
|
#endif
|
|
|
|
#if defined(MK_URP)
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/MetaInput.hlsl"
|
|
#elif defined(MK_LWRP)
|
|
#include "Packages/com.unity.render-pipelines.lightweight/ShaderLibrary/MetaInput.hlsl"
|
|
#else
|
|
#include "UnityMetaPass.cginc"
|
|
#endif
|
|
|
|
#include "../Core.hlsl"
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
// INPUT
|
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
struct VertexInputMeta
|
|
{
|
|
#if defined(MK_VERTCLR) || defined(MK_POLYBRUSH)
|
|
half4 color : COLOR;
|
|
#endif
|
|
float4 vertex : POSITION;
|
|
float2 texcoord0 : TEXCOORD0;
|
|
float2 staticLightmapUV : TEXCOORD1;
|
|
#if defined(DYNAMICLIGHTMAP_ON) || defined(UNITY_PASS_META)
|
|
float2 dynamicLightmapUV : TEXCOORD2;
|
|
#endif
|
|
#if defined(MK_PARALLAX)
|
|
half4 tangent : TANGENT;
|
|
half3 normal : NORMAL;
|
|
#endif
|
|
};
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
// OUTPUT
|
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
struct VertexOutputMeta
|
|
{
|
|
#ifdef MK_TCM
|
|
float4 uv : TEXCOORD0;
|
|
#endif
|
|
float4 svPositionClip : SV_POSITION;
|
|
#if defined(MK_VERTCLR) || defined(MK_POLYBRUSH)
|
|
autoLP4 color : COLOR;
|
|
#endif
|
|
#ifdef EDITOR_VISUALIZATION
|
|
float2 vizUV : TEXCOORD1;
|
|
float4 lightCoords : TEXCOORD2;
|
|
#endif
|
|
#if defined(MK_PARALLAX)
|
|
half3 viewTangent : TEXCOORD3;
|
|
#endif
|
|
};
|
|
|
|
#endif |