Example #1
0
 protected override void OnRelease()
 {
     ProcessedTexture = null;
     Objects.Clear();
     PostProcessingActions = null;
     Material                = null;
     SourceTextureBuffer     = null;
     FirstTemporaryBuffer    = null;
     SecondTemporaryBuffer   = null;
     ColorCorrectionBuffer   = null;
     ColorCorrectionMaterial = null;
     BlurBuffer              = null;
     BlurMaterial            = null;
     BloomBuffer             = null;
     BloomMaterial           = null;
     DistortionBuffer        = null;
     DistortionMaterial      = null;
     SharpenBuffer           = null;
     SharpenMaterial         = null;
     NoiseBuffer             = null;
     NoiseTexture            = null;
     NoiseMaterial           = null;
     FXAABuffer              = null;
     FXAAMaterial            = null;
     VignetteMaterial        = null;
     TransparentTexture      = null;
     AlphaDiffuseMaterial    = null;
     AddDiffuseMaterial      = null;
     OpaqueDiffuseMaterial   = null;
 }
Example #2
0
 static void NoiseEditor(NoiseMaterial n, bool colored = true)
 {
     EditorGUILayout.Separator();
     n.color             = EditorGUILayout.ColorField(n.color);
     n.noise.m_frequency = EditorGUILayout.Slider("Frequency:", n.noise.m_frequency, 0, 100);
     n.strength          = EditorGUILayout.Slider("Strength:", n.strength, 0, 100);
     n.pureStrength      = EditorGUILayout.Slider("Pure Strength:", n.pureStrength, 0, 100);
     n.exageration       = EditorGUILayout.Slider("Exageration:", n.exageration, 0, 100);
     n.invert            = EditorGUILayout.Toggle("Invert:", n.invert);
     n.rotation          = EditorGUILayout.Slider("Rotation:", n.rotation, 0, 360);
     n.scale             = EditorGUILayout.Vector2Field("Scale:", n.scale);
     n.noise.m_noiseType = (FastNoise.NoiseType)EditorGUILayout.EnumPopup("Type:", n.noise.m_noiseType);
     n.noise.m_seed      = EditorGUILayout.IntField(n.noise.m_seed);
     if (n.noise.m_noiseType == FastNoise.NoiseType.Linear)
     {
         n.noise.m_linearType = (FastNoise.LinearType)EditorGUILayout.EnumPopup("Linear Type:", n.noise.m_linearType);
     }
     n.noise.m_fractalType = (FastNoise.FractalType)EditorGUILayout.EnumPopup("FType:", n.noise.m_fractalType);
     EditorGUILayout.Separator();
 }
    static bool NoiseEditor(NoiseMaterial n, bool colored = true, int index = 0)
    {
        EditorGUILayout.BeginVertical("Box", GUILayout.MaxWidth(550));

        EditorGUILayout.BeginHorizontal();
        n.name = EditorGUILayout.TextField("Name:", n.name);
        if (GUILayout.Button("Remove"))
        {
            return(true);
        }
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.BeginHorizontal();
        if (colored)
        {
            EditorGUILayout.BeginVertical("Box");
            n.upColor   = EditorGUILayout.ColorField(n.upColor);
            n.downColor = EditorGUILayout.ColorField(n.downColor);
            EditorGUILayout.EndVertical();
        }
        n.noise.m_frequency = EditorGUILayout.Slider("Frequency:", n.noise.m_frequency, 0, 100);
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.BeginHorizontal();
        EditorGUILayout.BeginVertical();
        n.strength     = EditorGUILayout.Slider("Strength:", n.strength, 0, 100);
        n.pureStrength = EditorGUILayout.Slider("Pure Strength:", n.pureStrength, 0, 100);
        n.exageration  = EditorGUILayout.Slider("Exageration:", n.exageration, 0, 100);
        EditorGUILayout.EndVertical();

        EditorGUILayout.BeginVertical();
        n.invert   = EditorGUILayout.Toggle("Invert:", n.invert);
        n.rotation = EditorGUILayout.Slider("Rotation:", n.rotation, 0, 360);
        n.scale    = EditorGUILayout.Vector2Field("Scale:", n.scale);
        EditorGUILayout.EndVertical();
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.BeginHorizontal();
        EditorGUILayout.BeginVertical();
        n.noise.m_noiseType = (FastNoise.NoiseType)EditorGUILayout.EnumPopup("Type:", n.noise.m_noiseType);
        n.noise.m_interp    = (FastNoise.Interp)EditorGUILayout.EnumPopup("Interpolation:", n.noise.m_interp);
        if (n.noise.m_noiseType == FastNoise.NoiseType.Linear)
        {
            n.noise.m_linearType = (FastNoise.LinearType)EditorGUILayout.EnumPopup("Linear Type:", n.noise.m_linearType);
        }
        if (n.noise.IsFractal())
        {
            EditorGUILayout.BeginVertical("Box");
            n.noise.m_fractalType = (FastNoise.FractalType)EditorGUILayout.EnumPopup("Type:", n.noise.m_fractalType);
            n.noise.SetFractalGain(EditorGUILayout.FloatField("Gain", n.noise.m_gain));
            n.noise.SetFractalLacunarity(EditorGUILayout.FloatField("Lacunarity", n.noise.m_lacunarity));
            n.noise.SetFractalOctaves(EditorGUILayout.IntField("Octave", n.noise.m_octaves));
            EditorGUILayout.EndVertical();
        }
        if (n.noise.m_noiseType == FastNoise.NoiseType.Cellular)
        {
            CellularParameter(n.noise);
        }
        EditorGUILayout.EndVertical();
        n.noise.m_seed = EditorGUILayout.IntField("Seed:", n.noise.m_seed);
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.EndVertical();
        return(false);
    }