Ejemplo n.º 1
0
 public void UpdateResolution(int width, int height)
 {
     ((FBO)_outputSurface)?.Dispose();
     _outputSurface = new FBOwithDepth(Texture2dGL.Create(width, height));
     _outputSurface.Attach(Texture2dGL.Create(width, height, 3, true));
     _outputSurface.Attach(Texture2dGL.Create(width, height, 1, true));
     _outputSurface.Attach(Texture2dGL.Create(width, height, 3, true));
 }
Ejemplo n.º 2
0
        public void UpdateResolution(int width, int height)
        {
            ((FBO)_deferredSurface)?.Dispose();
            _deferredSurface = new FBOwithDepth(Texture2dGL.Create(width, height));
            _deferredSurface.Attach(Texture2dGL.Create(width, height, 3, true));
            _deferredSurface.Attach(Texture2dGL.Create(width, height, 1, true));
            _deferredSurface.Attach(Texture2dGL.Create(width, height, 3, true));
            _deferredSurface.Attach(Texture2dGL.Create(width, height, 4, true));

            _projectilesGenerationNvidia.UpdateResolution(width, height);
            _projectilesGenerationRadeon.UpdateResolution(width, height);
            _addProjectilesNvidia.UpdateResolution(width, height);
            _addProjectilesRadeon.UpdateResolution(width, height);

            _tesselation.UpdateResolution(width, height);
            _addTesselation.UpdateResolution(width, height);
        }
Ejemplo n.º 3
0
        public Water(IContentLoader contentLoader)
        {
            waterMapShader = contentLoader.Load <IShaderProgram>("WaterMap.*");
            mapFBO         = new FBO(Texture2dGL.Create(256, 256, 4, true));
            mapFBO.Attach(Texture2dGL.Create(256, 256, 4, true));
            mapFBO.Textures[0].WrapFunction = TextureWrapFunction.MirroredRepeat;
            waveLayers = GetWaveLayer();
            List <Wave> waveList = GetWaves();

            numberOfWaves = waveList.Count;
            waveBuffer.Set(waveList.ToArray(), BufferUsageHint.StaticCopy);
        }
Ejemplo n.º 4
0
        public void Resize(int width, int height)
        {
            mainFBO = new FBOwithDepth(Texture2dGL.Create(width, height, 4, true));
            mainFBO.Attach(Texture2dGL.Create(width, height, 4, true));
            mainFBO.Attach(Texture2dGL.Create(width, height, 4, true));
            mainFBO.Attach(Texture2dGL.Create(width, height, 4, true));
            mainFBO.Attach(Texture2dGL.Create(width, height, 4, true));
            foreach (ITexture2D text in mainFBO.Textures)
            {
                text.WrapFunction = TextureWrapFunction.MirroredRepeat;
            }
            pointLightFBO = new FBOwithDepth(Texture2dGL.Create(width, height, 4, true));
            pointLightFBO.Texture.WrapFunction = TextureWrapFunction.MirroredRepeat;

            lightViewFBO = new FBOwithDepth(Texture2dGL.Create(height, width, 4, true));
            lightViewFBO.Texture.WrapFunction = TextureWrapFunction.Repeat;

            shadowMapFBO = new FBOwithDepth(Texture2dGL.Create(width, height, 4, true));
            shadowMapFBO.Texture.WrapFunction = TextureWrapFunction.Repeat;

            finalPassFBO = new FBOwithDepth(Texture2dGL.Create(width, height, 4, true));

            satFilter = new SATGpuFilter(contentLoader, renderState, 32, 32, width, height, 4, 4);
        }