Last active
August 11, 2018 02:30
-
-
Save onotchi/2a664f426f443ad29f37362a4717cab0 to your computer and use it in GitHub Desktop.
UTS2のVertExmotion対応(抜粋)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct VertexInput { | |
float4 vertex : POSITION; | |
float4 color : COLOR; //★ | |
float3 normal : NORMAL; | |
float4 tangent : TANGENT; | |
float2 texcoord0 : TEXCOORD0; | |
}; | |
--- | |
VertexOutput vert (VertexInput v) { | |
v.vertex = VertExmotion(v.vertex, v.color); //★ | |
--- | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pass { | |
Name "Outline" | |
Tags { | |
} | |
Cull Front | |
CGPROGRAM | |
#pragma vertex vert | |
#pragma fragment frag | |
#include "UnityCG.cginc" | |
#include "VertExmotion.cginc" //★ | |
//#pragma fragmentoption ARB_precision_hint_fastest | |
//#pragma multi_compile_shadowcaster | |
//#pragma multi_compile_fog | |
#pragma only_renderers d3d9 d3d11 glcore gles gles3 metal xboxone ps4 switch | |
#pragma target 3.0 | |
//V.2.0.4 | |
#pragma multi_compile _IS_OUTLINE_CLIPPING_NO | |
#pragma multi_compile _OUTLINE_NML _OUTLINE_POS | |
//アウトライン処理はUTS_Outline.cgincへ. | |
#include "UCTS_OutlineVert.cginc" //★ | |
ENDCG | |
} | |
//ToonCoreStart | |
Pass { | |
Name "FORWARD" | |
Tags { | |
"LightMode"="ForwardBase" | |
} | |
Cull[_CullMode] | |
CGPROGRAM | |
#pragma vertex vert | |
#pragma fragment frag | |
//#define UNITY_PASS_FORWARDBASE | |
#include "UnityCG.cginc" | |
#include "VertExmotion.cginc" //★ | |
#include "AutoLight.cginc" | |
#include "Lighting.cginc" | |
#pragma multi_compile_fwdbase_fullshadows | |
#pragma multi_compile_fog | |
#pragma only_renderers d3d9 d3d11 glcore gles gles3 metal xboxone ps4 switch | |
#pragma target 3.0 | |
//v.2.0.4 | |
#pragma multi_compile _IS_CLIPPING_OFF | |
#pragma multi_compile _IS_PASS_FWDBASE | |
#include "UCTS_DoubleShadeWithFeatherVert.cginc" //★ | |
ENDCG | |
} | |
Pass { | |
Name "FORWARD_DELTA" | |
Tags { | |
"LightMode"="ForwardAdd" | |
} | |
Blend One One | |
Cull[_CullMode] | |
CGPROGRAM | |
#pragma vertex vert | |
#pragma fragment frag | |
//#define UNITY_PASS_FORWARDADD | |
#include "UnityCG.cginc" | |
#include "VertExmotion.cginc" //★ | |
#include "AutoLight.cginc" | |
#include "Lighting.cginc" | |
//for Unity2018.x | |
//#pragma multi_compile_fwdadd_fullshadows | |
#pragma multi_compile_fog | |
#pragma only_renderers d3d9 d3d11 glcore gles gles3 metal xboxone ps4 switch | |
#pragma target 3.0 | |
//v.2.0.4 | |
#pragma multi_compile _IS_CLIPPING_OFF | |
#pragma multi_compile _IS_PASS_FWDDELTA | |
#include "UCTS_DoubleShadeWithFeatherVert.cginc" //★ | |
ENDCG | |
} | |
Pass { | |
Name "ShadowCaster" | |
Tags { | |
"LightMode"="ShadowCaster" | |
} | |
Offset 1, 1 | |
Cull Off | |
CGPROGRAM | |
#pragma vertex vert | |
#pragma fragment frag | |
//#define UNITY_PASS_SHADOWCASTER | |
#include "UnityCG.cginc" | |
#include "VertExmotion.cginc" //★ | |
#include "Lighting.cginc" | |
#pragma fragmentoption ARB_precision_hint_fastest | |
#pragma multi_compile_shadowcaster | |
#pragma multi_compile_fog | |
#pragma only_renderers d3d9 d3d11 glcore gles gles3 metal xboxone ps4 switch | |
#pragma target 3.0 | |
//v.2.0.4 | |
#pragma multi_compile _IS_CLIPPING_OFF | |
#include "UCTS_ShadowCasterVert.cginc" //★ | |
ENDCG | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment