Esempio 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);
        }
Esempio 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);
        }
        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);
        }