private void Combine() { CombinerShader.Use(); CombinerFramebuffer.Use(); DeferredFramebuffer.UseTexture(CombinerShader.getConstInt("deferredTexBinding")); EnvLightFramebuffer.UseTexture(8); BloomYPass.UseTexture(11); CubeMaps[0].Texture.Use(TextureUnit.Texture23); FogFramebuffer.UseTexture(13); AmbientOcclusionFramebuffer.UseTexture(14); DrawPPMesh(); Game.CheckErrors("Combine pass"); }
private void HDR() { //HelperFramebuffer.Use(); HDRShader.Use(); HDRShader.SetUniform("InputFocalLength", Camera.Current.FocalLength); if (Camera.MainDisplayCamera != null) { HDRShader.SetUniform("CameraCurrentDepth", Camera.MainDisplayCamera.CurrentDepthFocus); HDRShader.SetUniform("LensBlurAmount", Camera.MainDisplayCamera.LensBlurAmount); } CombinerFramebuffer.UseTexture(4); BloomYPass.UseTexture(11); //Voxelizer.BindTextureTest(26); DrawPPMesh(); Game.CheckErrors("HDR pass"); }
private void Bloom() { BloomYPass.Use(); BloomXPass.Use(); BlitFramebuffers(CombinerFramebuffer, BloomYPass, BlitMode.Color); // here Y has deferred data, X is empty BloomShader.Use(); SetUniformsShared(); BloomShader.SetUniform("Pass", 0); BloomYPass.UseTexture(11); BloomXPass.Use(); PostProcessingMesh.Draw(); // here Y has deferred data, X has 1 pass result BloomYPass.Use(); // here Y is empty, x has 1 pass BloomShader.SetUniform("Pass", 1); BloomXPass.UseTexture(11); PostProcessingMesh.Draw(); // here y has 2 pass data }