public void CreateDefaultSettings(Material[] materials)
        {
            Settings = new ShaderControllerSettings
            {
                Heading                 = "Fantasy Adventure Environment Tree",
                Description             = "",
                LODFadePercentage       = true,
                LODFadeCrossfade        = true,
                SampleWind              = true,
                SupportsInstantIndirect = true
            };

            Settings.AddLabelProperty("Branch");
            Settings.AddColorProperty("Color", "Main color", "", ShaderControllerSettings.GetColorFromMaterials(materials, "_Color"));
            Settings.AddColorProperty("HueVariation", "Hue Variation", "",
                                      ShaderControllerSettings.GetColorFromMaterials(materials, "_HueVariation"));
            Settings.AddColorProperty("TransmissionColor", "Transmission Color", "",
                                      ShaderControllerSettings.GetColorFromMaterials(materials, "_TransmissionColor"));
            Settings.AddFloatProperty("AmbientOcclusionBranch", "Ambient Occlusion", "",
                                      ShaderControllerSettings.GetFloatFromMaterials(materials, "_AmbientOcclusion"), 0, 1);
            Settings.AddFloatProperty("GradientBrightnessBranch", "Gradient Brightness", "",
                                      ShaderControllerSettings.GetFloatFromMaterials(materials, "_GradientBrightness"), 0, 2);

            Settings.AddLabelProperty("Trunk");
            Settings.AddFloatProperty("GradientBrightnessTrunk", "Gradient Brightness", "",
                                      ShaderControllerSettings.GetFloatFromMaterials(materials, "_GradientBrightness"), 0, 2);
            Settings.AddFloatProperty("AmbientOcclusionTrunk", "Ambient Occlusion", "",
                                      ShaderControllerSettings.GetFloatFromMaterials(materials, "_AmbientOcclusion"), 0, 1);

            Settings.AddLabelProperty("Branch Wind");
            Settings.AddFloatProperty("WindInfluence", "Max Strength", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_MaxWindStrength"), 0, 1);
            Settings.AddFloatProperty("WindAmplitude", "Amplitude Multiplier", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_WindAmplitudeMultiplier"), 0, 10);
        }
        public void CreateDefaultSettings(Material[] materials)
        {
            Settings = new ShaderControllerSettings
            {
                Heading           = "Mtree settings",
                Description       = "",
                LODFadePercentage = true,
                LODFadeCrossfade  = true,
                SampleWind        = true,
            };

            Settings.AddLabelProperty("Foliage settings");
            Settings.AddColorProperty("BarkTintColor", "Bark Color", "", GetColor(materials, "_Color", "Bark"));
            Settings.AddColorProperty("FoliageTintColor", "Leaf Color", "", GetColor(materials, "_Color", "Leafs"));
            Settings.AddFloatProperty("MtreeCutoff", "Alpha Cutoff", "", GetFloatValue(materials, "_Cutoff", "Leafs"), 0, 1);


            Settings.AddLabelProperty("Translucency Settings");
            Settings.AddFloatProperty("TranslucentStrength", "Srength", "", GetFloatValue(materials, "_Translucency", "Leafs"), 0, 50);
            Settings.AddFloatProperty("TransNormalDistortion", "Normal Distortion", "", GetFloatValue(materials, "_TransNormalDistortion", "Leafs"), 0, 1);
            Settings.AddFloatProperty("TransScattering", "Scattering Falloff", "", GetFloatValue(materials, "_TransScattering", "Leafs"), 1, 50);
            Settings.AddColorProperty("TranslucentColor", "Translucent Color", "Only Works if Translucent Light Mode set to Custom!", GetColor(materials, "_TranslucencyTint", "Leafs"));

            Settings.AddLabelProperty("Other Settings");
            Settings.AddFloatProperty("AmbientOcclusion", "AO Strength", "", GetGlobalFloatValue(materials, "_OcclusionStrength"), 0, 1);
            Settings.AddFloatProperty("MtreeGlobalWindInfluence", "Global Wind Influence", "", GetGlobalFloatValue(materials, "_GlobalWindInfluence"), 0, 1);
            Settings.AddFloatProperty("MtreeGlobalWindTurbulence", "Global Wind Turbulence Influence", "", GetFloatValue(materials, "_GlobalTurbulenceInfluence", "Leafs"), 0, 1);
        }
Example #3
0
        public void CreateDefaultSettings(Material[] materials)
        {
            Settings = new ShaderControllerSettings
            {
                Heading           = "Mtree settings",
                Description       = "",
                LODFadePercentage = true,
                LODFadeCrossfade  = true,
                SampleWind        = true,
                //DynamicHUE = true,
                //BillboardHDWind = false
            };

            Settings.AddLabelProperty("Foliage settings");
            Settings.AddColorProperty("FoliageTintColor", "Foliage tint color", "", GetLeafColor(materials));
            Settings.AddFloatProperty("MtreeCutoff", "Alpha Cutoff", "", GetFloatValue(materials, "_Cutoff"), 0, 1);
            Settings.AddLabelProperty("Bark settings");
            Settings.AddColorProperty("BarkTintColor", "Bark tint color", "", GetBarkColor(materials));
            Settings.AddLabelProperty("Translucency Settings");
            Settings.AddFloatProperty("TranslucentScale", "Translucency Scale", "", GetFloatValue(materials, "_Scale"), 0, 10);
            Settings.AddFloatProperty("TranslucentPower", "Translucency Power", "", GetFloatValue(materials, "_Power"), 0, 10);
            Settings.AddFloatProperty("TranslucentDistortion", "Translucency Distortion", "", GetFloatValue(materials, "_Distortion"), 0, 10);
            Settings.AddColorProperty("TranslucentColor", "Translucency Color", "Only Works if Translucent Light Mode set to Custom!", GetTranslucentColor(materials));
            Settings.AddLabelProperty("Mtree Wind Settings");
            Settings.AddFloatProperty("MtreeGlobalWindInfluence", "Global Wind Influence", "", GetGlobalFloatValue(materials, "_GlobalWindInfluence"), 0, 1);
            Settings.AddFloatProperty("MtreeGlobalWindTurbulence", "Global Wind Turbulence Influence", "", GetFloatValue(materials, "_GlobalTurbulenceInfluence"), 0, 1);
        }
Example #4
0
        public void CreateDefaultSettings(Material[] materials)
        {
            Settings = new ShaderControllerSettings
            {
                Heading                 = "Nature Manufacture tree",
                Description             = "",
                LODFadePercentage       = false,
                LODFadeCrossfade        = false,
                SampleWind              = false,
                SupportsInstantIndirect = true,
                BillboardHDWind         = true
            };

            Settings.AddLabelProperty("Foliage settings");
            Settings.AddColorProperty("HealtyColor", "Healthy Color", "",
                                      ShaderControllerSettings.GetColorFromMaterials(materials, "_HealthyColor"));
            Settings.AddColorProperty("DryColor", "DryColor", "",
                                      ShaderControllerSettings.GetColorFromMaterials(materials, "_DryColor"));

            Settings.AddLabelProperty("Bark settings");
            Settings.AddColorProperty("BarkColor", "Bark Color", "",
                                      ShaderControllerSettings.GetColorFromMaterials(materials, "_Color"));

            Settings.AddLabelProperty("Wind settings");
            Settings.AddFloatProperty("InitialBend", "Initial Bend", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_InitialBend"), 0, 10);
            Settings.AddFloatProperty("Stiffness", "Stiffness", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_Stiffness"), 0, 10);
            Settings.AddFloatProperty("Drag", "Drag", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_Drag"), 0, 10);
            Settings.AddFloatProperty("ShiverDrag", "Shiver Drag", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_ShiverDrag"), 0, 10);
            Settings.AddFloatProperty("ShiverDirectionality", "Shiver Directionality", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_ShiverDirectionality"), 0, 1);
        }
Example #5
0
        public void CreateDefaultSettings(Material[] materials)
        {
            Settings = new ShaderControllerSettings
            {
                Heading                 = "Vegetation Studio Grass",
                Description             = "",
                LODFadePercentage       = false,
                LODFadeCrossfade        = false,
                SampleWind              = false,
                SupportsInstantIndirect = true,
                BillboardHDWind         = false
            };

            Settings.AddLabelProperty("Foliage settings");

            Settings.AddColorProperty("TintColor1", "Dry color tint", "",
                                      ShaderControllerSettings.GetColorFromMaterials(materials, "_Color"));
            Settings.AddColorProperty("TintColor2", "Healthy color tint", "",
                                      ShaderControllerSettings.GetColorFromMaterials(materials, "_ColorB"));

            Vector4 colorScale = ShaderControllerSettings.GetVector4FromMaterials(materials, "_AG_ColorNoiseArea");

            Settings.AddFloatProperty("TintAreaScale", "Tint area scale", "", colorScale.y, 10f, 150f);
            Settings.AddFloatProperty("RandomDarkening", "Random darkening", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_RandomDarkening"), 0, 1);
            Settings.AddFloatProperty("RootAmbient", "Root ambient", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_RootAmbient"), 0, 1);
            Settings.AddFloatProperty("AlphaCutoff", "Alpha cutoff", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_Cutoff"), 0, 1);
        }
Example #6
0
        public void CreateDefaultSettings(Material[] materials)
        {
            Settings = new ShaderControllerSettings
            {
                Heading                 = "Nature Manufacture Advanced Grass Snow",
                Description             = "",
                LODFadePercentage       = false,
                LODFadeCrossfade        = false,
                SampleWind              = false,
                SupportsInstantIndirect = true,
                BillboardHDWind         = false
            };

            Settings.AddLabelProperty("Snow settings");
            Settings.AddBooleanProperty("GlobalSnow", "Use Global Snow Value", "", true);
            Settings.AddFloatProperty("SnowAmount", "Snow Amount", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_Snow_Amount"), 0, 1);

            Settings.AddFloatProperty("SnowColorBrightness", "Snow Color Brightness", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_SnowColorBrightness"), 0, 2);

            Settings.AddLabelProperty("Foliage settings");
            Settings.AddColorProperty("HealthyColorTint", "Healthy color tint", "",
                                      ShaderControllerSettings.GetColorFromMaterials(materials, "_HealthyColor"));
            Settings.AddColorProperty("DryColorTint", "Dry color tint", "",
                                      ShaderControllerSettings.GetColorFromMaterials(materials, "_DryColor"));
            Settings.AddFloatProperty("ColorNoiseSpread", "Color noise spread", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_ColorNoiseSpread"), 1, 150);
            Settings.AddFloatProperty("AlphaCutoff", "Alpha cutoff", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_Cutoff"), 0, 1);

            Settings.AddLabelProperty("Wind settings");
            Settings.AddFloatProperty("InitialBend", "Initial Bend", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_InitialBend"), 0, 10);
            Settings.AddFloatProperty("Stiffness", "Stiffness", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_Stiffness"), 0, 10);
            Settings.AddFloatProperty("Drag", "Drag", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_Drag"), 0, 10);
            Settings.AddFloatProperty("ShiverDrag", "Shiver Drag", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_ShiverDrag"), 0, 10);
            Settings.AddFloatProperty("ShiverDirectionality", "Shiver Directionality", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_ShiverDirectionality"), 0, 1);
        }
Example #7
0
        public void CreateDefaultSettings(Material[] materials)
        {
            Settings = new ShaderControllerSettings
            {
                Heading                 = "ANGRYMESH Rocks",
                Description             = "",
                LODFadePercentage       = false,
                LODFadeCrossfade        = false,
                SampleWind              = false,
                SupportsInstantIndirect = false,
                BillboardHDWind         = false
            };

            Settings.AddLabelProperty("Base Rock settings");
            Settings.AddFloatProperty("BaseSmoothness", "Base smoothness", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_BaseSmoothness"), 0, 1);
            Settings.AddFloatProperty("BaseAOIntensity", "Base AO intensity", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_BaseAOIntensity"), 0, 1);
            Settings.AddColorProperty("BaseColor", "Base color", "", ShaderControllerSettings.GetColorFromMaterials(materials, "_BaseColor"));

            Settings.AddLabelProperty("Top settings");
            Settings.AddFloatProperty("TopIntensity", "Top intensity", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_TopIntensity"), 0, 1);
            Settings.AddFloatProperty("TopOffset", "Top offset", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_TopOffset"), 0, 1);
            Settings.AddFloatProperty("TopContrast", "Top contrast", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_TopContrast"), 0, 1);
            Settings.AddFloatProperty("TopNormalIntensity", "Top normal intensity", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_TopNormalIntensity"), 0, 1);
            Settings.AddColorProperty("TopColor", "Top color", "", ShaderControllerSettings.GetColorFromMaterials(materials, "_TopColor"));
        }
        public void CreateDefaultSettings(Material[] materials)
        {
            Settings = new ShaderControllerSettings
            {
                Heading                 = "Fantasy Adventure Environment Foliage",
                Description             = "Description text",
                LODFadePercentage       = false,
                LODFadeCrossfade        = false,
                SampleWind              = true,
                SupportsInstantIndirect = true
            };

            Settings.AddLabelProperty("Color");
            Settings.AddFloatProperty("AmbientOcclusion", "Ambient Occlusion", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_AmbientOcclusion"), 0, 1);

            Settings.AddLabelProperty("Translucency");
            Settings.AddFloatProperty("TranslucencyAmount", "Amount", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_TransmissionAmount"), 0, 10);
            Settings.AddFloatProperty("TranslucencySize", "Size", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_TransmissionSize"), 1, 20);

            Settings.AddLabelProperty("Wind");
            Settings.AddFloatProperty("WindInfluence", "Max Strength", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_MaxWindStrength"), 0, 1);
            Settings.AddFloatProperty("GlobalWindMotion", "Global motion", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_GlobalWindMotion"), 0, 1);
            Settings.AddFloatProperty("LeafFlutter", "Leaf flutter", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_LeafFlutter"), 0, 1);
            Settings.AddFloatProperty("WindSwinging", "Swinging", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_WindSwinging"), 0, 1);
            Settings.AddFloatProperty("WindAmplitude", "Amplitude Multiplier", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_WindAmplitudeMultiplier"), 0, 10);
        }
Example #9
0
        public void UpdateMaterial(Material material, EnvironmentSettings environmentSettings)
        {
            if (Settings == null)
            {
                return;
            }

            Shader.SetGlobalFloat("_Lux_SnowAmount", environmentSettings.SnowAmount);
            Shader.SetGlobalColor("_Lux_SnowColor", environmentSettings.SnowColor);
            Shader.SetGlobalColor("_Lux_SnowSpecColor", environmentSettings.SnowSpecularColor);
            Shader.SetGlobalVector("_Lux_RainfallRainSnowIntensity", new Vector3(environmentSettings.RainAmount, environmentSettings.RainAmount, environmentSettings.SnowAmount));
            Shader.SetGlobalVector("_Lux_WaterFloodlevel", new Vector4(environmentSettings.RainAmount, environmentSettings.RainAmount, environmentSettings.RainAmount, environmentSettings.RainAmount));


            if (ShaderControllerSettings.HasShader(material, FoliageShaderNames))
            {
                material.SetColor("_HueVariation", Settings.GetColorPropertyValue("ColorVariation"));
                material.SetFloat("_TranslucencyStrength", Settings.GetFloatPropertyValue("TranslucencyStrength"));
                material.SetFloat("_Cutoff", Settings.GetFloatPropertyValue("AlphaCutoff"));
            }
            else
            {
                material.SetColor("_HueVariation", Settings.GetColorPropertyValue("BarkColorVariation"));
                material.SetFloat("_TranslucencyStrength", Settings.GetFloatPropertyValue("BarkTranslucencyStrength"));
                material.SetFloat("_Cutoff", Settings.GetFloatPropertyValue("BarkAlphaCutoff"));
            }


            material.SetFloat("_TumbleStrength", Settings.GetFloatPropertyValue("TumbleStrength"));
            material.SetFloat("_TumbleFrequency", Settings.GetFloatPropertyValue("TumbleFrequency"));
            material.SetFloat("_TimeOffset", Settings.GetFloatPropertyValue("TimeOffset"));
            material.SetFloat("_LeafTurbulence", Settings.GetFloatPropertyValue("LeafTurbulence"));
            material.SetFloat("_EdgeFlutterInfluence", Settings.GetFloatPropertyValue("EdgeFlutterInfluence"));
        }
Example #10
0
        public void CreateDefaultSettings(Material[] materials)
        {
            Settings = new ShaderControllerSettings
            {
                Heading                            = "CTI Tree shader",
                Description                        = "",
                LODFadePercentage                  = true,
                LODFadeCrossfade                   = true,
                SampleWind                         = false,
                SupportsInstantIndirect            = false,
                BillboardHDWind                    = false,
                OverrideBillboardAtlasNormalShader = "AwesomeTechnologies/Billboards/RenderNormalsAtlasCTI",
                OverrideBillboardAtlasShader       = "AwesomeTechnologies/Billboards/RenderDiffuseAtlasCTI"
            };

            Settings.AddLabelProperty("Foliage settings");

            Settings.AddColorProperty("ColorVariation", "Color variation", "",
                                      ShaderControllerSettings.GetColorFromMaterials(materials, "_HueVariation"));
            Settings.AddFloatProperty("TranslucencyStrength", "Translucency strength", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_TranslucencyStrength"), 0, 1);
            Settings.AddFloatProperty("AlphaCutoff", "Alpha cutoff", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_Cutoff"), 0, 1);

            Settings.AddLabelProperty("Wind settings");

            Settings.AddFloatProperty("TumbleStrength", "Tumble Strength", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_TumbleStrength"), -1, 1);
            Settings.AddFloatProperty("TumbleFrequency", "Tumble Frequency", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_TumbleFrequency"), 0, 4);
            Settings.AddFloatProperty("TimeOffset", "Time Offset", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_TimeOffset"), 0, 2);
            Settings.AddFloatProperty("LeafTurbulence", "Leaf Turbulence", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_LeafTurbulence"), 0, 4);
            Settings.AddFloatProperty("EdgeFlutterInfluence", "Edge Flutter Influence", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_EdgeFlutterInfluence"), 0, 1);
        }
Example #11
0
        public void CreateDefaultSettings(Material[] materials)
        {
            Settings = new ShaderControllerSettings
            {
                Heading           = "SpeedTree settings",
                Description       = "",
                LODFadePercentage = true,
                LODFadeCrossfade  = true,
                SampleWind        = true,
                DynamicHUE        = true,
                BillboardHDWind   = true
            };

            Settings.AddBooleanProperty("ReplaceShader", "Replace shader", "This will replace the speedtree shader with a Vegetation Studio version that supports instanced indirect", true);

            Settings.AddLabelProperty("Foliage settings");
            Settings.AddColorProperty("FoliageHue", "Foliage HUE variation", "",
                                      ShaderControllerSettings.GetColorFromMaterials(materials, "_HueVariation"));
            Settings.AddColorProperty("FoliageTintColor", "Foliage tint color", "",
                                      ShaderControllerSettings.GetColorFromMaterials(materials, "_Color"));

            Settings.AddLabelProperty("Bark settings");
            Settings.AddColorProperty("BarkHue", "Bark HUE variation", "",
                                      ShaderControllerSettings.GetColorFromMaterials(materials, "_HueVariation"));
            Settings.AddColorProperty("BarkTintColor", "Bark tint color", "",
                                      ShaderControllerSettings.GetColorFromMaterials(materials, "_Color"));
        }
Example #12
0
        public void CreateDefaultSettings(Material[] materials)
        {
            Settings = new ShaderControllerSettings
            {
                Heading                 = "Stylized Grass",
                Description             = "Description text",
                LODFadePercentage       = true,
                LODFadeCrossfade        = false,
                UpdateWind              = true,
                SampleWind              = true,
                DynamicHUE              = true,
                SupportsInstantIndirect = true
            };

            fadeParams = ShaderControllerSettings.GetVector4FromMaterials(materials, "_FadeParams");
            Settings.AddBooleanProperty("enableDistFade", "Distance fading", "", fadeParams.z == 1f ? true : false);
            Settings.AddFloatProperty("fadeStartDist", "Fade start", "", fadeParams.x, 0, 100);
            Settings.AddFloatProperty("fadeEndDist", "Fade end", "", fadeParams.y, 0, 500);

            Settings.AddLabelProperty(" ");

            Settings.AddLabelProperty("Color");
            Settings.AddColorProperty("_BaseColor", "Base color", "", ShaderControllerSettings.GetColorFromMaterials(materials, "_BaseColor"));
            Settings.AddColorProperty("_HueVariation", "Hue variation", "", ShaderControllerSettings.GetColorFromMaterials(materials, "_HueVariation"));
            Settings.AddFloatProperty("_ColorMapStrength", "Colormap strength", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_ColorMapStrength"), 0, 1);
            if (Shader.GetGlobalVector("_ColorMapUV").w == 0f)
            {
                Settings.AddLabelProperty("No color map is currently active");
            }
            Settings.AddFloatProperty("_ColorMapHeight", "Colormap height", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_ColorMapHeight"), 0, 1);

            //No support for vectors!
            //Settings.add("_HeightmapScaleInfluence", "Heightmap scale influence", "", ShaderControllerSettings.GetVector4FromMaterials(materials, "_HeightmapScaleInfluence"), 0, 1);

            Settings.AddFloatProperty("_OcclusionStrength", "Ambient Occlusion", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_OcclusionStrength"), 0, 1);
            Settings.AddFloatProperty("_VertexDarkening", "Random darkening", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_VertexDarkening"), 0, 1);
            Settings.AddFloatProperty("_Translucency", "Translucency", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_Translucency"), 0, 1);

            Settings.AddLabelProperty(" ");

            Settings.AddLabelProperty("Bending");
            Settings.AddBooleanProperty("_BendMode", "Per-vertex", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_BendMode") == 0 ? true : false);
            Settings.AddFloatProperty("_BendPushStrength", "Pushing", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_BendPushStrength"), 0, 1);
            Settings.AddFloatProperty("_BendFlattenStrength", "Flattening", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_BendFlattenStrength"), 0, 1);
            Settings.AddFloatProperty("_PerspectiveCorrection", "Perspective Correction", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_PerspectiveCorrection"), 0, 1);

            Settings.AddLabelProperty(" ");

            Settings.AddLabelProperty("Wind");
            Settings.AddFloatProperty("_WindAmbientStrength", "Ambient Strength", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_WindAmbientStrength"), 0, 1);
            Settings.AddFloatProperty("_WindSpeed", "Speed", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_WindSpeed"), 0, 10);
            Settings.AddFloatProperty("_WindVertexRand", "Vertex randomization", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_WindVertexRand"), 0, 1);
            Settings.AddFloatProperty("_WindObjectRand", "Object randomization", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_WindObjectRand"), 0, 1);
            Settings.AddFloatProperty("_WindRandStrength", "Random strength", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_WindRandStrength"), 0, 1);
            Settings.AddFloatProperty("_WindSwinging", "Swinging", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_WindSwinging"), 0, 1);
            Settings.AddFloatProperty("_WindGustStrength", "Gust Strength", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_WindGustStrength"), 0, 1);
            Settings.AddFloatProperty("_WindGustFreq", "Gust Frequency", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_WindGustFreq"), 0, 10);
            Settings.AddFloatProperty("_WindGustTint", "Gust Tint", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_WindGustTint"), 0, 1);
        }
Example #13
0
 public void CreateDefaultSettings(Material[] materials)
 {
     Settings = new ShaderControllerSettings
     {
         Heading                            = "Synty Studios Tree shader",
         Description                        = "",
         LODFadePercentage                  = false,
         LODFadeCrossfade                   = false,
         SampleWind                         = false,
         SupportsInstantIndirect            = false,
         BillboardHDWind                    = false,
         OverrideBillboardAtlasNormalShader = "AwesomeTechnologies/Billboards/RenderNormalsAtlas",
         OverrideBillboardAtlasShader       = "AwesomeTechnologies/Billboards/RenderDiffuseAtlasPolygonTree",
         BillboardRenderMode                = BillboardRenderMode.Standard
     };
 }
Example #14
0
        public ShaderControllerSettings(ShaderControllerSettings source)
        {
            Heading                 = source.Heading;
            Description             = source.Description;
            SupportsInstantIndirect = source.SupportsInstantIndirect;
            LODFadeCrossfade        = source.LODFadeCrossfade;
            LODFadePercentage       = source.LODFadePercentage;
            SampleWind              = source.SampleWind;
            UpdateWind              = source.UpdateWind;
            BillboardSnow           = source.BillboardSnow;
            DynamicHUE              = source.DynamicHUE;

            for (int i = 0; i <= source.ControlerPropertyList.Count - 1; i++)
            {
                ControlerPropertyList.Add(new SerializedControllerProperty(source.ControlerPropertyList[i]));
            }
        }
        public void CreateDefaultSettings(Material[] materials)
        {
            Settings = new ShaderControllerSettings
            {
                Heading                 = "Nature Manufacture Standard Snow",
                Description             = "",
                LODFadePercentage       = false,
                LODFadeCrossfade        = false,
                SampleWind              = false,
                SupportsInstantIndirect = true,
                BillboardHDWind         = false
            };

            Settings.AddLabelProperty("Snow settings");
            Settings.AddBooleanProperty("GlobalSnow", "Use Global Snow Value", "", true);
            Settings.AddFloatProperty("SnowAmount", "Snow Amount", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_Snow_Amount"), 0, 1);
        }
        public void CreateDefaultSettings(Material[] materials)
        {
            Settings = new ShaderControllerSettings
            {
                Heading           = "Mtree settings",
                Description       = "",
                LODFadePercentage = true,
                LODFadeCrossfade  = true,
                SampleWind        = true,
                //DynamicHUE = true,
                //BillboardHDWind = false
            };

            Settings.AddLabelProperty("Foliage settings");
            Settings.AddColorProperty("FoliageTintColor", "Foliage tint color", "", GetLeafColor(materials));
            Settings.AddColorProperty("FoliageTranslucencyColor", "Foliage Translucency color", "",
                                      ShaderControllerSettings.GetColorFromMaterials(materials, "_TranslucencyColor"));

            Settings.AddLabelProperty("Bark settings");
            Settings.AddColorProperty("BarkTintColor", "Bark tint color", "", GetBarkColor(materials));
        }
        public void CreateDefaultSettings(Material[] materials)
        {
            Settings = new ShaderControllerSettings
            {
                Heading                 = "Fantasy Adventure Environment Grass",
                Description             = "Description text",
                LODFadePercentage       = false,
                LODFadeCrossfade        = false,
                SampleWind              = true,
                SupportsInstantIndirect = true
            };

            bool hasPigmentMap = Shader.GetGlobalTexture("_PigmentMap");


            Settings.AddLabelProperty("Color");
            Settings.AddBooleanProperty("EnablePigmentMap", "Use pigment map", "", hasPigmentMap);
            Settings.AddColorProperty("TopColor", "Top", "", ShaderControllerSettings.GetColorFromMaterials(materials, "_ColorTop"));
            Settings.AddColorProperty("BottomColor", "Bottom", "", ShaderControllerSettings.GetColorFromMaterials(materials, "_ColorBottom"));
            Settings.AddFloatProperty("WindTint", "Wind tint", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_ColorVariation"), 0, 1);
            Settings.AddFloatProperty("AmbientOcclusion", "Ambient Occlusion", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_AmbientOcclusion"), 0, 1);

            Settings.AddLabelProperty("Translucency");
            Settings.AddFloatProperty("TranslucencyAmount", "Amount", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_TransmissionAmount"), 0, 10);
            Settings.AddFloatProperty("TranslucencySize", "Size", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_TransmissionSize"), 1, 20);

            Settings.AddLabelProperty("Wind");
            Settings.AddFloatProperty("WindInfluence", "Influence", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_MaxWindStrength"), 0, 1);
            Settings.AddFloatProperty("WindSwinging", "Swinging", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_WindSwinging"), 0, 1);
            Settings.AddFloatProperty("WindAmplitude", "Amplitude Multiplier", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_WindAmplitudeMultiplier"), 0, 10);

#if TOUCH_REACT
            Settings.AddLabelProperty("Touch React");
#else
            Settings.AddLabelProperty("Player bending");
#endif
            Settings.AddFloatProperty("BendingInfluence", "Influence", "", ShaderControllerSettings.GetFloatFromMaterials(materials, "_BendingInfluence"), 0, 1);
        }
 public void CreateDefaultSettings(Material[] materials)
 {
     Settings = new ShaderControllerSettings();
 }