Exemplo n.º 1
0
        /// <inheritdoc/>
        protected override void InitializeCore()
        {
            renderModelObjectInfoKey = RootRenderFeature.RenderData.CreateObjectKey <Matrix[]>();
            skinningInfoKey          = RootRenderFeature.RenderData.CreateStaticObjectKey <SkinningInfo>();
            renderEffectKey          = ((RootEffectRenderFeature)RootRenderFeature).RenderEffectKey;

            blendMatrices = ((RootEffectRenderFeature)RootRenderFeature).CreateDrawCBufferOffsetSlot(TransformationSkinningKeys.BlendMatrixArray.Name);
        }
Exemplo n.º 2
0
        /// <inheritdoc/>
        protected override void InitializeCore()
        {
            RenderModelObjectInfoKey = RootRenderFeature.RenderData.CreateObjectKey <RenderModelFrameInfo>();
            RenderModelViewInfoKey   = RootRenderFeature.RenderData.CreateViewObjectKey <RenderModelViewInfo>();

            time         = ((RootEffectRenderFeature)RootRenderFeature).CreateFrameCBufferOffsetSlot(GlobalKeys.Time.Name);
            view         = ((RootEffectRenderFeature)RootRenderFeature).CreateViewCBufferOffsetSlot(TransformationKeys.View.Name);
            camera       = ((RootEffectRenderFeature)RootRenderFeature).CreateViewCBufferOffsetSlot(CameraKeys.NearClipPlane.Name);
            world        = ((RootEffectRenderFeature)RootRenderFeature).CreateDrawCBufferOffsetSlot(TransformationKeys.World.Name);
            worldInverse = ((RootEffectRenderFeature)RootRenderFeature).CreateDrawCBufferOffsetSlot(TransformationKeys.WorldInverse.Name);
        }
Exemplo n.º 3
0
        protected override void InitializeCore()
        {
            if (TransformRenderFeature == null)
            {
                TransformRenderFeature = ((MeshRenderFeature)RootRenderFeature).RenderFeatures.OfType <TransformRenderFeature>().FirstOrDefault();
                if (TransformRenderFeature == null)
                {
                    throw new ArgumentNullException(nameof(TransformRenderFeature));
                }
            }

            previousTransformationInfoKey     = RootRenderFeature.RenderData.CreateStaticObjectKey <StaticObjectInfo>();
            previousTransformationViewInfoKey = RootRenderFeature.RenderData.CreateViewObjectKey <PreviousObjectViewInfo>();
            renderModelObjectInfoKey          = TransformRenderFeature.RenderModelObjectInfoKey;

            previousWorldViewProjection = ((RootEffectRenderFeature)RootRenderFeature).CreateDrawCBufferOffsetSlot(MeshVelocityKeys.PreviousWorldViewProjection.Name);
        }