Beispiel #1
0
    void UpdateTexture(string name, TextureProcessor processor)
    {
        RenderTexture old = Globals.instance.components.previewRenderer.material.GetTexture(name) as RenderTexture;

        Globals.instance.components.previewRenderer.material.SetTexture(name, null);

        if (old != null)
        {
            RenderTexture.ReleaseTemporary(old);
        }

        Globals.instance.components.previewRenderer.material.SetTexture(
            name,
            processor.Generate(Globals.instance.textureSize_preview).renderTexture
            );
    }
Beispiel #2
0
                protected override RenderTexture GenerateRenderTexture(int resolution)
                {
                    AO ["Range"]     = this ["Range"];
                    AO ["Quality"]   = this ["Quality"];
                    AO ["Intensity"] = this ["Intensity"];

                    AO.inputs [0].connectedProcessor = this.inputs[0].connectedProcessor;

                    blur ["Range"]         = this ["Range Blur"];
                    blur ["Quality"]       = this ["Quality Blur"];
                    blur ["Undersampling"] = this ["Undersampling Blur"];

                    blur.inputs [0].connectedProcessor = AO;

                    ProTeGe_Texture t2 = blur.Generate(resolution);

                    return(t2.renderTexture);
                }
Beispiel #3
0
 protected override ProTeGe_Texture GetBandNoise(int i, int resolution)
 {
     perlin["Resolution"] = resolution / Mathf.Pow(2, i + 1);
     return(perlin.Generate(resolution));
 }
Beispiel #4
0
 protected override ProTeGe_Texture GetBandNoise(int i, int resolution)
 {
     seeder["Density"] = Mathf.Log(resolution / Mathf.Pow(2, i + 2)) / Mathf.Log(2);
     return(cellular.Generate(resolution));
 }