Skip to content

Instantly share code, notes, and snippets.

@m2wasabi
Last active April 11, 2019 21:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save m2wasabi/5a4c0e1daa606da9527d67f5ca3301b4 to your computer and use it in GitHub Desktop.
Save m2wasabi/5a4c0e1daa606da9527d67f5ca3301b4 to your computer and use it in GitHub Desktop.
VRM UTS2 Export Example
using System.Collections.Generic;
namespace UniGLTF.ShaderPropExporter
{
public static partial class PreShaderPropExporter
{
[PreExportShader]
static KeyValuePair<string, ShaderProps> UTS_DoubleShadeWithFeather
{
get
{
return new KeyValuePair<string, ShaderProps>(
"UnityChanToonShader/Toon_DoubleShadeWithFeather",
new ShaderProps
{
//Unitychan Toon Shader v.2.0.7
Properties = new ShaderProperty[]{
new ShaderProperty("_simpleUI", ShaderPropertyType.Float)
,new ShaderProperty("_utsVersion", ShaderPropertyType.Float)
,new ShaderProperty("_utsTechnique", ShaderPropertyType.Float)
,new ShaderProperty("_CullMode", ShaderPropertyType.Float)
,new ShaderProperty("_MainTex", ShaderPropertyType.TexEnv)
,new ShaderProperty("_BaseColor", ShaderPropertyType.Color)
,new ShaderProperty("_Color", ShaderPropertyType.Color)
,new ShaderProperty("_Is_LightColor_Base", ShaderPropertyType.Float)
,new ShaderProperty("_1st_ShadeMap", ShaderPropertyType.TexEnv)
,new ShaderProperty("_Use_BaseAs1st", ShaderPropertyType.Float)
,new ShaderProperty("_1st_ShadeColor", ShaderPropertyType.Color)
,new ShaderProperty("_Is_LightColor_1st_Shade", ShaderPropertyType.Float)
,new ShaderProperty("_2nd_ShadeMap", ShaderPropertyType.TexEnv)
,new ShaderProperty("_Use_1stAs2nd", ShaderPropertyType.Float)
,new ShaderProperty("_2nd_ShadeColor", ShaderPropertyType.Color)
,new ShaderProperty("_Is_LightColor_2nd_Shade", ShaderPropertyType.Float)
,new ShaderProperty("_NormalMap", ShaderPropertyType.TexEnv)
,new ShaderProperty("_BumpScale", ShaderPropertyType.Range)
,new ShaderProperty("_Is_NormalMapToBase", ShaderPropertyType.Float)
,new ShaderProperty("_Set_SystemShadowsToBase", ShaderPropertyType.Float)
,new ShaderProperty("_Tweak_SystemShadowsLevel", ShaderPropertyType.Range)
,new ShaderProperty("_BaseColor_Step", ShaderPropertyType.Range)
,new ShaderProperty("_BaseShade_Feather", ShaderPropertyType.Range)
,new ShaderProperty("_ShadeColor_Step", ShaderPropertyType.Range)
,new ShaderProperty("_1st2nd_Shades_Feather", ShaderPropertyType.Range)
,new ShaderProperty("_1st_ShadeColor_Step", ShaderPropertyType.Range)
,new ShaderProperty("_1st_ShadeColor_Feather", ShaderPropertyType.Range)
,new ShaderProperty("_2nd_ShadeColor_Step", ShaderPropertyType.Range)
,new ShaderProperty("_2nd_ShadeColor_Feather", ShaderPropertyType.Range)
,new ShaderProperty("_StepOffset", ShaderPropertyType.Range)
,new ShaderProperty("_Is_Filter_HiCutPointLightColor", ShaderPropertyType.Float)
,new ShaderProperty("_Set_1st_ShadePosition", ShaderPropertyType.TexEnv)
,new ShaderProperty("_Set_2nd_ShadePosition", ShaderPropertyType.TexEnv)
,new ShaderProperty("_HighColor", ShaderPropertyType.Color)
//v.2.0.4 HighColor_Tex
,new ShaderProperty("_HighColor_Tex", ShaderPropertyType.TexEnv)
,new ShaderProperty("_Is_LightColor_HighColor", ShaderPropertyType.Float)
,new ShaderProperty("_Is_NormalMapToHighColor", ShaderPropertyType.Float)
,new ShaderProperty("_HighColor_Power", ShaderPropertyType.Range)
,new ShaderProperty("_Is_SpecularToHighColor", ShaderPropertyType.Float)
,new ShaderProperty("_Is_BlendAddToHiColor", ShaderPropertyType.Float)
,new ShaderProperty("_Is_UseTweakHighColorOnShadow", ShaderPropertyType.Float)
,new ShaderProperty("_TweakHighColorOnShadow", ShaderPropertyType.Range)
//ハイカラーマスク.
,new ShaderProperty("_Set_HighColorMask", ShaderPropertyType.TexEnv)
,new ShaderProperty("_Tweak_HighColorMaskLevel", ShaderPropertyType.Range)
,new ShaderProperty("_RimLight", ShaderPropertyType.Float)
,new ShaderProperty("_RimLightColor", ShaderPropertyType.Color)
,new ShaderProperty("_Is_LightColor_RimLight", ShaderPropertyType.Float)
,new ShaderProperty("_Is_NormalMapToRimLight", ShaderPropertyType.Float)
,new ShaderProperty("_RimLight_Power", ShaderPropertyType.Range)
,new ShaderProperty("_RimLight_InsideMask", ShaderPropertyType.Range)
,new ShaderProperty("_RimLight_FeatherOff", ShaderPropertyType.Float)
//リムライト追加プロパティ.
,new ShaderProperty("_LightDirection_MaskOn", ShaderPropertyType.Float)
,new ShaderProperty("_Tweak_LightDirection_MaskLevel", ShaderPropertyType.Range)
,new ShaderProperty("_Add_Antipodean_RimLight", ShaderPropertyType.Float)
,new ShaderProperty("_Ap_RimLightColor", ShaderPropertyType.Color)
,new ShaderProperty("_Is_LightColor_Ap_RimLight", ShaderPropertyType.Float)
,new ShaderProperty("_Ap_RimLight_Power", ShaderPropertyType.Range)
,new ShaderProperty("_Ap_RimLight_FeatherOff", ShaderPropertyType.Float)
//リムライトマスク.
,new ShaderProperty("_Set_RimLightMask", ShaderPropertyType.TexEnv)
,new ShaderProperty("_Tweak_RimLightMaskLevel", ShaderPropertyType.Range)
//ここまで.
,new ShaderProperty("_MatCap", ShaderPropertyType.Float)
,new ShaderProperty("_MatCap_Sampler", ShaderPropertyType.TexEnv)
,new ShaderProperty("_BlurLevelMatcap", ShaderPropertyType.Range)
,new ShaderProperty("_MatCapColor", ShaderPropertyType.Color)
,new ShaderProperty("_Is_LightColor_MatCap", ShaderPropertyType.Float)
,new ShaderProperty("_Is_BlendAddToMatCap", ShaderPropertyType.Float)
,new ShaderProperty("_Tweak_MatCapUV", ShaderPropertyType.Range)
,new ShaderProperty("_Rotate_MatCapUV", ShaderPropertyType.Range)
,new ShaderProperty("_CameraRolling_Stabilizer", ShaderPropertyType.Float)
,new ShaderProperty("_Is_NormalMapForMatCap", ShaderPropertyType.Float)
,new ShaderProperty("_NormalMapForMatCap", ShaderPropertyType.TexEnv)
,new ShaderProperty("_BumpScaleMatcap", ShaderPropertyType.Range)
,new ShaderProperty("_Rotate_NormalMapForMatCapUV", ShaderPropertyType.Range)
,new ShaderProperty("_Is_UseTweakMatCapOnShadow", ShaderPropertyType.Float)
,new ShaderProperty("_TweakMatCapOnShadow", ShaderPropertyType.Range)
//MatcapMask
,new ShaderProperty("_Set_MatcapMask", ShaderPropertyType.TexEnv)
,new ShaderProperty("_Tweak_MatcapMaskLevel", ShaderPropertyType.Range)
,new ShaderProperty("_Inverse_MatcapMask", ShaderPropertyType.Float)
,new ShaderProperty("_Is_Ortho", ShaderPropertyType.Float)
,new ShaderProperty("_EMISSIVE", ShaderPropertyType.Float)
,new ShaderProperty("_Emissive_Tex", ShaderPropertyType.TexEnv)
,new ShaderProperty("_Emissive_Color", ShaderPropertyType.Color)
,new ShaderProperty("_Base_Speed", ShaderPropertyType.Float)
,new ShaderProperty("_Scroll_EmissiveU", ShaderPropertyType.Range)
,new ShaderProperty("_Scroll_EmissiveV", ShaderPropertyType.Range)
,new ShaderProperty("_Rotate_EmissiveUV", ShaderPropertyType.Float)
,new ShaderProperty("_Is_PingPong_Base", ShaderPropertyType.Float)
,new ShaderProperty("_Is_ColorShift", ShaderPropertyType.Float)
,new ShaderProperty("_ColorShift", ShaderPropertyType.Color)
,new ShaderProperty("_ColorShift_Speed", ShaderPropertyType.Float)
,new ShaderProperty("_Is_ViewShift", ShaderPropertyType.Float)
,new ShaderProperty("_ViewShift", ShaderPropertyType.Color)
,new ShaderProperty("_Is_ViewCoord_Scroll", ShaderPropertyType.Float)
//Outline
,new ShaderProperty("_OUTLINE", ShaderPropertyType.Float)
,new ShaderProperty("_Outline_Width", ShaderPropertyType.Float)
,new ShaderProperty("_Farthest_Distance", ShaderPropertyType.Float)
,new ShaderProperty("_Nearest_Distance", ShaderPropertyType.Float)
,new ShaderProperty("_Outline_Sampler", ShaderPropertyType.TexEnv)
,new ShaderProperty("_Outline_Color", ShaderPropertyType.Color)
,new ShaderProperty("_Is_BlendBaseColor", ShaderPropertyType.Float)
,new ShaderProperty("_Is_OutlineTex", ShaderPropertyType.Float)
,new ShaderProperty("_OutlineTex", ShaderPropertyType.TexEnv)
,new ShaderProperty("_Offset_Z", ShaderPropertyType.Float)
,new ShaderProperty("_Is_BakedNormal", ShaderPropertyType.Float)
,new ShaderProperty("_BakedNormal", ShaderPropertyType.TexEnv)
,new ShaderProperty("_GI_Intensity", ShaderPropertyType.Range)
,new ShaderProperty("_Unlit_Intensity", ShaderPropertyType.Range)
,new ShaderProperty("_Is_Filter_LightColor", ShaderPropertyType.Float)
,new ShaderProperty("_Is_BLD", ShaderPropertyType.Float)
,new ShaderProperty("_Offset_X_Axis_BLD", ShaderPropertyType.Range)
,new ShaderProperty("_Offset_Y_Axis_BLD", ShaderPropertyType.Range)
,new ShaderProperty("_Inverse_Z_Axis_BLD", ShaderPropertyType.Float)
}
}
);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment