Пример #1
0
    void Start()
    {
        _rnd = GetComponent<Renderer>();
        _rnd.GetPropertyBlock(_block = new MaterialPropertyBlock());

        _inputs = input.GetPixels();

        _width = input.width;
        _height = input.height;
        _pixelCount = _inputs.Length;
        _texSize = new Vector2(_width, _height);

        output = new Texture2D(_width, _height, TextureFormat.ARGB32, false);
        _outputs = input.GetPixels();
        output.SetPixels(_outputs);
        output.Apply();

        _block.SetTexture(PROP_MAIN_TEX, output);
        _rnd.SetPropertyBlock(_block);
        _mcmc = new MCMC(output, stdDev);

        StartCoroutine (Pinning (0.01f, 200));
    }
Пример #2
0
 void Start()
 {
     _mcmc = new MCMC(probTex, stddev, height);
     StartCoroutine(Generate());
 }
Пример #3
0
 void Start()
 {
     _mcmc = new MCMC(probability, stdDev);
     _pins = new List<Transform>();
     StartCoroutine(Pinning(0.01f, 20));
 }