config.getY_ScreenResolution(), config.getMultisamples()); transparentSceneFbo = new TransparencyFbo(config.getX_ScreenResolution(), config.getY_ScreenResolution()); GLContext.getResources().setOpaqueSceneFbo(opaqueSceneFbo); fullScreenQuadMultisample = new FullScreenMultisampleQuad(); pssmFbo = new ParallelSplitShadowMapsFbo(); sampleCoverage = new SampleCoverage(config.getX_ScreenResolution(), config.getY_ScreenResolution()); fxaa = new FXAA(); config.getY_ScreenResolution()); opaqueTransparencyBlending = new OpaqueTransparencyBlending(config.getX_ScreenResolution(), config.getY_ScreenResolution()); sunlightScattering = new SunLightScattering(); lensFlare = new LensFlare(); ssao = new SSAO(config.getX_ScreenResolution(), config.getY_ScreenResolution()); underWaterRenderer = new UnderWaterRenderer(); contrastController = new ContrastController();
pushConstants = memAlloc(pushConstantRange); pushConstants.putFloat(BaseContext.getConfig().getX_ScreenResolution()); pushConstants.putFloat(BaseContext.getConfig().getY_ScreenResolution()); pushConstants.flip();
VkUtil.createLongBuffer(renderInfo.getDescriptorSetLayouts()), BaseContext.getConfig().getX_ScreenResolution(), BaseContext.getConfig().getY_ScreenResolution(), VkContext.getResources().getOffScreenFbo().getRenderPass().getHandle(), VkContext.getResources().getOffScreenFbo().getColorAttachmentCount(),
public TransparencyFbo(VkDevice device, VkPhysicalDeviceMemoryProperties memoryProperties) { height = BaseContext.getConfig().getY_ScreenResolution();
height = BaseContext.getConfig().getY_ScreenResolution()/1;
public OffScreenFbo(VkDevice device, VkPhysicalDeviceMemoryProperties memoryProperties) { height = BaseContext.getConfig().getY_ScreenResolution(); int samples = BaseContext.getConfig().getMultisamples();
height = BaseContext.getConfig().getY_ScreenResolution();
VkUtil.createLongBuffer(descriptorSetLayouts), BaseContext.getConfig().getX_ScreenResolution(), BaseContext.getConfig().getY_ScreenResolution(), VkContext.getResources().getTransparencyFbo().getRenderPass().getHandle(), VkContext.getResources().getTransparencyFbo().getColorAttachmentCount(),
public void updateUniforms(GLTexture opaqueSceneTexture, GLTexture opaqueSceneLightScatteringTexture, GLTexture transparencyLayer, GLTexture alphaMap, GLTexture transparencyLayerLightScatteringTexture) { setUniformf("width", BaseContext.getConfig().getX_ScreenResolution()); setUniformf("height", BaseContext.getConfig().getY_ScreenResolution()); glActiveTexture(GL_TEXTURE0); opaqueSceneTexture.bind(); setUniformi("opaqueSceneTexture", 0); glActiveTexture(GL_TEXTURE2); opaqueSceneLightScatteringTexture.bind(); setUniformi("opaqueSceneLightScatteringTexture", 2); glActiveTexture(GL_TEXTURE3); transparencyLayer.bind(); setUniformi("transparencyLayer", 3); glActiveTexture(GL_TEXTURE5); alphaMap.bind(); setUniformi("transparencyAlphaMap", 5); glActiveTexture(GL_TEXTURE6); transparencyLayerLightScatteringTexture.bind(); setUniformi("transparencyLayerLightScatteringTexture", 6); }
VkUtil.createLongBuffer(descriptorSetLayouts), BaseContext.getConfig().getX_ScreenResolution(), BaseContext.getConfig().getY_ScreenResolution(), VkContext.getResources().getOffScreenFbo().getRenderPass().getHandle(), VkContext.getResources().getOffScreenFbo().getColorAttachmentCount(), VkUtil.createLongBuffer(descriptorSetLayouts), BaseContext.getConfig().getX_ScreenResolution(), BaseContext.getConfig().getY_ScreenResolution(), VkContext.getResources().getOffScreenReflectionFbo().getRenderPass().getHandle(), VkContext.getResources().getOffScreenReflectionFbo().getColorAttachmentCount(), 1);
shaderPipeline, vertexInput, VkUtil.createLongBuffer(descriptorSetLayouts), BaseContext.getConfig().getX_ScreenResolution(), BaseContext.getConfig().getY_ScreenResolution(), VkContext.getResources().getOffScreenFbo().getRenderPass().getHandle(), VkContext.getResources().getOffScreenFbo().getColorAttachmentCount(),
BaseContext.getConfig().getY_ScreenResolution(), offScreenFbo.getAttachmentImageView(Attachment.POSITION), offScreenFbo.getAttachmentImageView(Attachment.LIGHT_SCATTERING)); BaseContext.getConfig().getY_ScreenResolution(), offScreenFbo.getAttachmentImageView(Attachment.ALBEDO), offScreenFbo.getAttachmentImageView(Attachment.POSITION), opaqueTransparencyBlending = new OpaqueTransparencyBlending(graphicsDevice, BaseContext.getConfig().getX_ScreenResolution(), BaseContext.getConfig().getY_ScreenResolution(), deferredLighting.getDeferredLightingSceneImageView(), offScreenFbo.getAttachmentImageView(Attachment.DEPTH), fxaa = new FXAA(graphicsDevice, BaseContext.getConfig().getX_ScreenResolution(), BaseContext.getConfig().getY_ScreenResolution(), displayImageView); bloom = new Bloom(graphicsDevice, BaseContext.getConfig().getX_ScreenResolution(), BaseContext.getConfig().getY_ScreenResolution(), displayImageView);
glViewport(0,0,Constants.PSSM_SHADOWMAP_RESOLUTION,Constants.PSSM_SHADOWMAP_RESOLUTION); sceneGraph.renderShadows(); glViewport(0,0,config.getX_ScreenResolution(),config.getY_ScreenResolution()); pssmFbo.getConfig().disable(); pssmFbo.getFBO().unbind(); dofBlur.render(opaqueSceneFbo.getAttachmentTexture(Attachment.DEPTH), lightScatteringMaskTexture, displayTexture, config.getX_ScreenResolution(), config.getY_ScreenResolution()); displayTexture = dofBlur.getVerticalBlurSceneTexture();