public ResolutionRelativeRenderLayer( string fullName
                                            , GlobalLayerScaleType layerScaleType 
                                            , UniformLayerScaleType uniformScaleType )
            : base(fullName)
        {
            rp = ArtemisEngine.RenderPipeline; // for convenience

            LayerScaleType = layerScaleType;
            UniformScaleType = uniformScaleType;
            RecalculateTargetTransform();
        }
        /// <summary>
        /// Called after everything is rendered (also after RenderLayerTarget is called).
        /// </summary>
        protected override void PostRender()
        {
            if (RequiresTargetTransformRecalc)
            {
                if (_newLayerScaleType.HasValue)
                    _layerScaleType = _newLayerScaleType.Value;
                if (_newUniformScaleType.HasValue)
                    _uniformScaleType = _newUniformScaleType.Value;

                _newLayerScaleType = null;
                _newUniformScaleType = null;

                RecalculateTargetTransform(); // sets _requiresTargetTransformRecalc to false.
            }
        }