Exemple #1
0
        public LightArea(ShadowmapSize shadowmapSize)
        {
            int baseSize = 2 << (int)shadowmapSize;
            LightAreaSize = new Vector2(baseSize, baseSize);
            renderTarget = new RenderImage("LightArea"+ shadowmapSize,(uint)baseSize, (uint)baseSize);

            Mask = IoCManager.Resolve<IResourceManager>().GetSprite("whitemask");
        }
        public ShadowMapResolver(ShadowmapSize maxShadowmapSize, ShadowmapSize maxDepthBufferSize,
                                 IResourceManager resourceManager)
        {
            _resourceManager = resourceManager;

            reductionChainCount = (int) maxShadowmapSize;
            baseSize = 2 << reductionChainCount;
            depthBufferSize = 2 << (int) maxDepthBufferSize;
        }
        public LightArea(ShadowmapSize size)
        {
            int baseSize = 2 << (int)size;

            LightAreaSize = new Vector2D(baseSize, baseSize);
            renderTarget  = new RenderImage("lightTest" + baseSize + IoCManager.Resolve <IRand>().Next(100000, 999999),
                                            baseSize, baseSize, ImageBufferFormats.BufferRGB888A8);
            Mask = IoCManager.Resolve <IResourceManager>().GetSprite("whitemask");
        }
Exemple #4
0
        public ShadowMapResolver(ShadowmapSize maxShadowmapSize, ShadowmapSize maxDepthBufferSize,
                                 IResourceManager resourceManager)
        {
            _resourceManager = resourceManager;


            reductionChainCount = (int)maxShadowmapSize;
            baseSize            = 2 << reductionChainCount;
            depthBufferSize     = 2 << (int)maxDepthBufferSize;
        }
        public ShadowMapResolver(QuadRenderer quad, ShadowmapSize maxShadowmapSize, ShadowmapSize maxDepthBufferSize,
                                 IResourceManager resourceManager)
        {
            _resourceManager = resourceManager;
            quadRender       = quad;

            //reductionChainCount =  maxShadowmapSize;
            //baseSize = 2 << reductionChainCount;
            //depthBufferSize = 2 << maxDepthBufferSize;
        }
        public ShadowMapResolver(QuadRenderer quad, ShadowmapSize maxShadowmapSize, ShadowmapSize maxDepthBufferSize,
                                 IResourceManager resourceManager)
        {
            _resourceManager = resourceManager;
            quadRender = quad;

            //reductionChainCount =  maxShadowmapSize;
            //baseSize = 2 << reductionChainCount;
            //depthBufferSize = 2 << maxDepthBufferSize;
        }
Exemple #7
0
        public LightArea(ShadowmapSize shadowmapSize)
        {
            int baseSize = 2 << (int)shadowmapSize;

            LightAreaSize = new Vector2f(baseSize, baseSize);
            RenderTarget  = new RenderImage("LightArea" + shadowmapSize, (uint)baseSize, (uint)baseSize);


            Mask = IoCManager.Resolve <IResourceManager>().GetSprite("whitemask");
        }
Exemple #8
0
 public LightArea(ShadowmapSize shadowmapSize)
 {
     // TODO: Complete member initialization
     this.shadowmapSize = shadowmapSize;
 }
 private LightArea GetLightArea(ShadowmapSize size)
 {
     switch (size)
     {
         case ShadowmapSize.Size128:
             return lightArea128;
         case ShadowmapSize.Size256:
             return lightArea256;
         case ShadowmapSize.Size512:
             return lightArea512;
         case ShadowmapSize.Size1024:
             return lightArea1024;
         default:
             return lightArea1024;
     }
 }