Ejemplo n.º 1
0
        protected override void OnDraw(RenderTexture2D dst, RenderTexture2D src)
        {
            // マテリアル内の変数を設定する
            material.SetFloat("time", stopwatch.ElapsedMilliseconds * 0.001f);

            // マテリアルの内容を出力する
            DrawOnTexture2DWithMaterial(dst, material);
        }
Ejemplo n.º 2
0
        protected override void OnDraw(RenderTexture2D dst, RenderTexture2D src)
        {
            // 変数の設定
            Material.SetVector2DF("resolution", Engine.WindowSize.To2DF());
            Material.SetFloat("time", Stopwatch.ElapsedMilliseconds * 0.001f);

            // マテリアルを用いて描画
            DrawOnTexture2DWithMaterial(dst, Material);
        }
Ejemplo n.º 3
0
        protected override void OnDrawAdditionally()
        {
            Vector2DF xy_ul = GetGlobalPosition() - CenterPosition;
            Vector2DF xy_ur = GetGlobalPosition() - CenterPosition + new Vector2DF(WindowSize.X, 0);
            Vector2DF xy_dl = GetGlobalPosition() - CenterPosition + new Vector2DF(0, WindowSize.Y);
            Vector2DF xy_dr = GetGlobalPosition() - CenterPosition + WindowSize;

            Color white = new Color(255, 255, 255, 255);

            Vector2DF uv_ul = new Vector2DF(0, 0);
            Vector2DF uv_ur = new Vector2DF(1, 0);
            Vector2DF uv_dl = new Vector2DF(0, 1);
            Vector2DF uv_dr = new Vector2DF(1, 1);

            WindowMaterial.SetFloat("time", Stopwatch.ElapsedMilliseconds * 0.001f);
            WindowMaterial.SetFloat("noise", NoisyValue);

            DrawSpriteWithMaterialAdditionally(
                xy_ul, xy_ur, xy_dr, xy_dl,
                white, white, white, white,
                uv_ul, uv_ur, uv_dr, uv_dl,
                WindowMaterial, AlphaBlendMode.Add, 0
                );
        }
Ejemplo n.º 4
0
 protected override void OnUpdate()
 {
     GaugeMaterial.SetFloat("g_value", (float)GaugeValue);
 }