Пример #1
0
        private void TableauMaterialTabInventoryItemTooltipOnRender(Texture sender, EventArgs e)
        {
            TableauView tableauView = this.View;

            if ((NativeObject)tableauView == (NativeObject)null)
            {
                tableauView = sender.TableauView;
                tableauView.SetEnable(this._isEnabled);
            }


            tableauView.SetRenderWithPostfx(true);
            tableauView.SetClearColor(0U);
            tableauView.SetScene(this._tableauScene);
            if ((NativeObject)this._camera == (NativeObject)null)
            {
                this._camera = Camera.CreateCamera();
                this._camera.SetViewVolume(true, -0.5f, 0.5f, -0.5f, 0.5f, 0.01f, 100f);
                this.ResetCamera();
                tableauView.SetSceneUsesSkybox(false);
            }
            tableauView.SetCamera(this._camera);
            if (this._isRotatingByDefault)
            {
                this.UpdateRotation(1f, 0.0f);
            }
            tableauView.SetDeleteAfterRendering(false);
            tableauView.SetContinuousRendering(true);
        }
Пример #2
0
        internal void CharacterTableauContinuousRenderFunction(Texture sender, EventArgs e)
        {
            Scene       scene       = (Scene)sender.UserData;
            TableauView tableauView = sender.TableauView;

            if (scene == null)
            {
                tableauView.SetContinuousRendering(false);
                tableauView.SetDeleteAfterRendering(true);
                return;
            }
            scene.EnsurePostfxSystem();
            scene.SetDofMode(false);
            scene.SetMotionBlurMode(false);
            scene.SetBloom(true);
            scene.SetDynamicShadowmapCascadesRadiusMultiplier(0.31f);
            tableauView.SetRenderWithPostfx(true);
            float       cameraRatio = this._cameraRatio;
            MatrixFrame camPos      = this._camPos;

            if (this._continuousRenderCamera != null)
            {
                Camera continuousRenderCamera = this._continuousRenderCamera;
                this._continuousRenderCamera = null;
                continuousRenderCamera.SetFovVertical(0.7853982f, cameraRatio, 0.2f, 200f);
                continuousRenderCamera.Frame = camPos;
                tableauView.SetCamera(continuousRenderCamera);
                tableauView.SetScene(scene);
                tableauView.SetSceneUsesSkybox(false);
                tableauView.SetDeleteAfterRendering(false);
                tableauView.SetContinuousRendering(true);
                tableauView.SetDoNotRenderThisFrame(true);
                tableauView.SetClearColor(0u);
                tableauView.SetFocusedShadowmap(true, ref this._frame.origin, 1.55f);
            }
        }