/// <summary> /// Creates a new shadowmap resolver /// </summary> /// <param name="factory">The factory.</param> /// <param name="quadRender">The quad render.</param> /// <param name="maxShadowmapSize">Size of the max shadowmap.</param> /// <param name="maxDepthBufferSize">Size of the max depth buffer.</param> public ShadowmapResolver(GraphicFactory factory, QuadRender quadRender, ShadowmapSize maxShadowmapSize, ShadowmapSize maxDepthBufferSize) { this.graphicsDevice = factory.device; this.quadRender = quadRender; reductionChainCount = (int)maxShadowmapSize; baseSize = 2 << reductionChainCount; depthBufferSize = 2 << (int)maxDepthBufferSize; LoadContent(factory); }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); quad = new QuadRender(GraphicsDevice); renOutput = new RenderTarget2D(GraphicsDevice, 1920, 1080, false, SurfaceFormat.Vector4, DepthFormat.Depth24); effect = Content.Load <Effect>("Shader"); base.LoadContent(); // TODO: use this.Content to load your game content here }
internal void Reset(int width, int height, QuadRender quadRender) { _width = width; _height = height; _quadRender = quadRender; Disposer.RemoveAndDispose(ref _edgeSurface); Disposer.RemoveAndDispose(ref _edgeTex); _edgeTex = new Texture(_device, width, height, 1, Usage.RenderTarget, Format.A8R8G8B8, Pool.Default); _edgeSurface = _edgeTex.GetSurfaceLevel(0); Disposer.RemoveAndDispose(ref _blendSurface); Disposer.RemoveAndDispose(ref _blendTex); _blendTex = new Texture(_device, width, height, 1, Usage.RenderTarget, Format.A8R8G8B8, Pool.Default); _blendSurface = _blendTex.GetSurfaceLevel(0); }
public static void Initialise(int iCount) { _QR = GameObject.Find("Explosions").GetComponent<Explosions>()._QR; Debug.Log("Particle initialise QR = " + _QR); if(_Pool == null) { _Pool = new LinkedList<Particle>(); _Active = new LinkedList<Particle>(); _ClearList = new List<Particle>(); } for(int i = 0; i < iCount; ++i) { Particle pObject = new Particle(); _Pool.AddLast(pObject); } }
void Awake() { Debug.Log("Explosions: Awake"); _QR = new QuadRender(null,3000,this.GetComponent<MeshFilter>().mesh); }
void Awake() { _Atlas = new Atlas(); _Atlas.LoadAtlas(_AtlasScript); _QR = new QuadRender(null,300,this.GetComponent<MeshFilter>().mesh); }