public void GrabMaterialValues()
 {
     if (Material)
     {
         shaderKeywords          = Material.shaderKeywords;
         _Source_Blend_Mode      = (_SrcBlendFloatEnum)(int)Material.GetFloat("_SrcBlendFloat");
         _Destination_Blend_Mode = (_DstBlendFloatEnum)(int)Material.GetFloat("_DstBlendFloat");
         _Tint                 = Material.GetColor("_TintColor");
         _MainTex              = Material.GetTexture("_MainTex");
         _MainTexScale         = Material.GetTextureScale("_MainTex");
         _MainTexOffset        = Material.GetTextureOffset("_MainTex");
         _Cloud1Tex            = Material.GetTexture("_Cloud1Tex");
         _Cloud1TexScale       = Material.GetTextureScale("_Cloud1Tex");
         _Cloud1TexOffset      = Material.GetTextureOffset("_Cloud1Tex");
         _Cloud2Tex            = Material.GetTexture("_Cloud2Tex");
         _Cloud2TexScale       = Material.GetTextureScale("_Cloud2Tex");
         _Cloud2TexOffset      = Material.GetTextureOffset("_Cloud2Tex");
         _RemapTex             = Material.GetTexture("_RemapTex");
         _RemapTexScale        = Material.GetTextureScale("_RemapTex");
         _RemapTexOffset       = Material.GetTextureOffset("_RemapTex");
         _CutoffScroll         = Material.GetVector("_CutoffScroll");
         _SoftFactor           = Material.GetFloat("_InvFade");
         _SoftPower            = Material.GetFloat("_SoftPower");
         _BrightnessBoost      = Material.GetFloat("_Boost");
         _RimPower             = Material.GetFloat("_RimPower");
         _RimStrength          = Material.GetFloat("_RimStrength");
         _AlphaBoost           = Material.GetFloat("_AlphaBoost");
         _IntersectionStrength = Material.GetFloat("_IntersectionStrength");
         _Cull_Mode            = (_CullEnum)(int)Material.GetFloat("_Cull");
         _IgnoreVertexColors   = Convert.ToBoolean(Material.GetFloat("_VertexColorsOn"));
         _EnableTriplanarProjectionsForClouds = Convert.ToBoolean(Material.GetFloat("_TriplanarOn"));
         MaterialName = Material.name;
     }
 }
Exemplo n.º 2
0
 public void GrabMaterialValues()
 {
     if (Material)
     {
         _Source_Blend_Mode      = (_SrcBlendFloatEnum)(int)Material.GetFloat("_SrcBlendFloat");
         _Destination_Blend_Mode = (_DstBlendFloatEnum)(int)Material.GetFloat("_DstBlendFloat");
         _Tint                   = Material.GetColor("_TintColor");
         _MainTex                = Material.GetTexture("_MainTex");
         _MainTexScale           = Material.GetTextureScale("_MainTex");
         _MainTexOffset          = Material.GetTextureOffset("_MainTex");
         _Cloud1Tex              = Material.GetTexture("_Cloud1Tex");
         _Cloud1TexScale         = Material.GetTextureScale("_Cloud1Tex");
         _Cloud1TexOffset        = Material.GetTextureOffset("_Cloud1Tex");
         _Cloud2Tex              = Material.GetTexture("_Cloud2Tex");
         _Cloud2TexScale         = Material.GetTextureScale("_Cloud2Tex");
         _Cloud2TexOffset        = Material.GetTextureOffset("_Cloud2Tex");
         _RemapTex               = Material.GetTexture("_RemapTex");
         _RemapTexScale          = Material.GetTextureScale("_RemapTex");
         _RemapTexOffset         = Material.GetTextureOffset("_RemapTex");
         _CutoffScroll           = Material.GetVector("_CutoffScroll");
         _SoftFactor             = Material.GetFloat("_InvFade");
         _SoftPower              = Material.GetFloat("_SoftPower");
         _BrightnessBoost        = Material.GetFloat("_Boost");
         _RimPower               = Material.GetFloat("_RimPower");
         _RimStrength            = Material.GetFloat("_RimStrength");
         _AlphaBoost             = Material.GetFloat("_AlphaBoost");
         _IntersectionStrength   = Material.GetFloat("_IntersectionStrength");
         _Cull_Mode              = (_CullEnum)(int)Material.GetFloat("_Cull");
         _FadeFromVertexColorsOn = Material.IsKeywordEnabled("FADE_FROM_VERTEX_COLORS");
         _EnableTriplanarProjectionsForClouds = Material.IsKeywordEnabled("TRIPLANAR");
         MaterialName = Material.name;
     }
 }
 public override void GrabMaterialValues()
 {
     if (Material)
     {
         shaderKeywords          = Material.shaderKeywords;
         _Source_Blend_Mode      = (_SrcBlendFloatEnum)(int)Material.GetFloat("_SrcBlendFloat");
         _Destination_Blend_Mode = (_DstBlendFloatEnum)(int)Material.GetFloat("_DstBlendFloat");
         _Tint                 = Material.GetColor("_TintColor");
         _MainTex              = Material.GetTexture("_MainTex");
         _MainTexScale         = Material.GetTextureScale("_MainTex");
         _MainTexOffset        = Material.GetTextureOffset("_MainTex");
         _Cloud1Tex            = Material.GetTexture("_Cloud1Tex");
         _Cloud1TexScale       = Material.GetTextureScale("_Cloud1Tex");
         _Cloud1TexOffset      = Material.GetTextureOffset("_Cloud1Tex");
         _Cloud2Tex            = Material.GetTexture("_Cloud2Tex");
         _Cloud2TexScale       = Material.GetTextureScale("_Cloud2Tex");
         _Cloud2TexOffset      = Material.GetTextureOffset("_Cloud2Tex");
         _RemapTex             = Material.GetTexture("_RemapTex");
         _RemapTexScale        = Material.GetTextureScale("_RemapTex");
         _RemapTexOffset       = Material.GetTextureOffset("_RemapTex");
         _CutoffScroll         = Material.GetVector("_CutoffScroll");
         _SoftFactor           = Material.GetFloat("_InvFade");
         _SoftPower            = Material.GetFloat("_SoftPower");
         _BrightnessBoost      = Material.GetFloat("_Boost");
         _RimPower             = Material.GetFloat("_RimPower");
         _RimStrength          = Material.GetFloat("_RimStrength");
         _AlphaBoost           = Material.GetFloat("_AlphaBoost");
         _IntersectionStrength = Material.GetFloat("_IntersectionStrength");
         _Cull_Mode            = (_CullEnum)(int)Material.GetFloat("_Cull");
         MaterialName          = Material.name;
     }
 }
Exemplo n.º 4
0
 public void GrabMaterialValues()
 {
     if (Material)
     {
         _Source_Blend_Mode       = (_SrcBlendFloatEnum)(int)Material.GetFloat("_SrcBlend");
         _Destination_Blend_Mode  = (_DstBlendFloatEnum)(int)Material.GetFloat("_DstBlend");
         _InternalSimpleBlendMode = (int)Material.GetFloat("_InternalSimpleBlendMode");
         _Tint                     = Material.GetColor("_TintColor");
         _DisableRemapping         = Material.IsKeywordEnabled("DISABLEREMAP");
         _MainTex                  = Material.GetTexture("_MainTex");
         _MainTexScale             = Material.GetTextureScale("_MainTex");
         _MainTexOffset            = Material.GetTextureOffset("_MainTex");
         _RemapTex                 = Material.GetTexture("_RemapTex");
         _RemapTexScale            = Material.GetTextureScale("_RemapTex");
         _RemapTexOffset           = Material.GetTextureOffset("_RemapTex");
         _SoftFactor               = Material.GetFloat("_InvFade");
         _BrightnessBoost          = Material.GetFloat("_Boost");
         _AlphaBoost               = Material.GetFloat("_AlphaBoost");
         _AlphaBias                = Material.GetFloat("_AlphaBias");
         _UseUV1                   = Material.IsKeywordEnabled("USE_UV1");
         _FadeWhenNearCamera       = Material.IsKeywordEnabled("FADECLOSE");
         _FadeCloseDistance        = Material.GetFloat("_FadeCloseDistance");
         _Cull_Mode                = (_CullEnum)(int)Material.GetFloat("_Cull");
         _ZTest_Mode               = (_ZTestEnum)(int)Material.GetFloat("_ZTest");
         _DepthOffset              = Material.GetFloat("_DepthOffset");
         _CloudRemapping           = Material.IsKeywordEnabled("USE_CLOUDS");
         _DistortionClouds         = Material.IsKeywordEnabled("CLOUDOFFSET");
         _DistortionStrength       = Material.GetFloat("_DistortionStrength");
         _Cloud1Tex                = Material.GetTexture("_Cloud1Tex");
         _Cloud1TexScale           = Material.GetTextureScale("_Cloud1Tex");
         _Cloud1TexOffset          = Material.GetTextureOffset("_Cloud1Tex");
         _Cloud2Tex                = Material.GetTexture("_Cloud2Tex");
         _Cloud2TexScale           = Material.GetTextureScale("_Cloud2Tex");
         _Cloud2TexOffset          = Material.GetTextureOffset("_Cloud2Tex");
         _CutoffScroll             = Material.GetVector("_CutoffScroll");
         _VertexColors             = Material.IsKeywordEnabled("VERTEXCOLOR");
         _LuminanceForVertexAlpha  = Material.IsKeywordEnabled("VERTEXALPHA");
         _LuminanceForTextureAlpha = Material.IsKeywordEnabled("CALCTEXTUREALPHA");
         _VertexOffset             = Material.IsKeywordEnabled("VERTEXOFFSET");
         _FresnelFade              = Material.IsKeywordEnabled("FRESNEL");
         _SkyboxOnly               = Material.IsKeywordEnabled("SKYBOX_ONLY");
         _FresnelPower             = Material.GetFloat("_FresnelPower");
         _VertexOffsetAmount       = Material.GetFloat("_OffsetAmount");
         MaterialName              = Material.name;
     }
 }