public override void DrawFeatureGUI(Material mat) { geoTexture = EditorGUILayout.Toggle(CShaderGeoTexture, geoTexture); if (geoTexture) { EditorGUI.indentLevel++; geoRange = EditorGUILayout.Toggle(CShaderGeoRange, geoRange); geoCurve = EditorGUILayout.Toggle(CShaderGeoCurve, geoCurve); EditorGUI.indentLevel--; } tintBlendMode = (BlendMode)EditorGUILayout.EnumPopup(CShaderTint, tintBlendMode); normalBlendMode = (NormalBlendMode)EditorGUILayout.EnumPopup(CShaderGlobalNormal, normalBlendMode); SAOMBlend = (SAOMBlendMode)EditorGUILayout.EnumPopup(CShaderGlobalSAOM, SAOMBlend); emisBlend = (SAOMBlendMode)EditorGUILayout.EnumPopup(CShaderGlobalEmis, emisBlend); }
public override void Unpack(string[] keywords) { geoTexture = HasFeature(keywords, DefineFeature._GEOMAP); if (geoTexture) { perTexGeoStr = HasFeature(keywords, DefineFeature._PERTEXGEO); geoRange = HasFeature(keywords, DefineFeature._GEORANGE); geoCurve = HasFeature(keywords, DefineFeature._GEOCURVE); } perTexTintStr = HasFeature(keywords, DefineFeature._PERTEXGLOBALTINTSTRENGTH); tintBlendMode = BlendMode.Off; if (HasFeature(keywords, DefineFeature._GLOBALTINT)) { tintBlendMode = BlendMode.Multiply2X; } if (HasFeature(keywords, DefineFeature._GLOBALTINTOVERLAY)) { tintBlendMode = BlendMode.Overlay; } if (HasFeature(keywords, DefineFeature._GLOBALTINTCROSSFADE)) { tintBlendMode = BlendMode.CrossFade; } normalBlendMode = NormalBlendMode.Off; if (HasFeature(keywords, DefineFeature._GLOBALNORMALS)) { normalBlendMode = NormalBlendMode.NormalBlend; } if (HasFeature(keywords, DefineFeature._GLOBALNORMALCROSSFADE)) { normalBlendMode = NormalBlendMode.CrossFade; } SAOMBlend = HasFeature(keywords, DefineFeature._GLOBALSMOOTHAOMETAL) ? SAOMBlendMode.CrossFade : SAOMBlendMode.Off; emisBlend = HasFeature(keywords, DefineFeature._GLOBALEMIS) ? SAOMBlendMode.CrossFade : SAOMBlendMode.Off; perTexNormalStr = HasFeature(keywords, DefineFeature._PERTEXGLOBALNORMALSTRENGTH); perTexSAOMStr = HasFeature(keywords, DefineFeature._PERTEXGLOBALSOAMSTRENGTH); perTexEmisStr = HasFeature(keywords, DefineFeature._PERTEXGLOBALEMISSTRENGTH); }