opaqueSceneFbo = new OffScreenFbo(config.getX_ScreenResolution(), 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(); deferredLighting = new DeferredLighting(config.getX_ScreenResolution(), 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.putFloat(BaseContext.getConfig().getX_ScreenResolution()); pushConstants.putFloat(BaseContext.getConfig().getY_ScreenResolution()); pushConstants.flip();
renderInfo.getShaderPipeline(), renderInfo.getVertexInput(), VkUtil.createLongBuffer(renderInfo.getDescriptorSetLayouts()), BaseContext.getConfig().getX_ScreenResolution(), BaseContext.getConfig().getY_ScreenResolution(), VkContext.getResources().getOffScreenFbo().getRenderPass().getHandle(),
public TransparencyFbo(VkDevice device, VkPhysicalDeviceMemoryProperties memoryProperties) { width = BaseContext.getConfig().getX_ScreenResolution(); height = BaseContext.getConfig().getY_ScreenResolution();
public ReflectionFbo(VkDevice device, VkPhysicalDeviceMemoryProperties memoryProperties) { width = BaseContext.getConfig().getX_ScreenResolution()/1; height = BaseContext.getConfig().getY_ScreenResolution()/1;
public OffScreenFbo(VkDevice device, VkPhysicalDeviceMemoryProperties memoryProperties) { width = BaseContext.getConfig().getX_ScreenResolution(); height = BaseContext.getConfig().getY_ScreenResolution(); int samples = BaseContext.getConfig().getMultisamples();
public SingleAttachmentFbo(VkDevice device, VkPhysicalDeviceMemoryProperties memoryProperties) { width = BaseContext.getConfig().getX_ScreenResolution(); height = BaseContext.getConfig().getY_ScreenResolution();
shaderPipeline, vertexInput, VK_PRIMITIVE_TOPOLOGY_POINT_LIST, VkUtil.createLongBuffer(descriptorSetLayouts), BaseContext.getConfig().getX_ScreenResolution(), BaseContext.getConfig().getY_ScreenResolution(), VkContext.getResources().getTransparencyFbo().getRenderPass().getHandle(),
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); }
graphicsShaderPipeline, vertexInput, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VkUtil.createLongBuffer(descriptorSetLayouts), BaseContext.getConfig().getX_ScreenResolution(), BaseContext.getConfig().getY_ScreenResolution(), VkContext.getResources().getOffScreenFbo().getRenderPass().getHandle(), reflectionShaderPipeline, vertexInput, VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST, VkUtil.createLongBuffer(descriptorSetLayouts), BaseContext.getConfig().getX_ScreenResolution(), BaseContext.getConfig().getY_ScreenResolution(), VkContext.getResources().getOffScreenReflectionFbo().getRenderPass().getHandle(),
BaseContext.getConfig().getX_ScreenResolution(), BaseContext.getConfig().getY_ScreenResolution(), VkContext.getResources().getOffScreenFbo().getRenderPass().getHandle(),
BaseContext.getConfig().getX_ScreenResolution(), BaseContext.getConfig().getY_ScreenResolution(), offScreenFbo.getAttachmentImageView(Attachment.POSITION), BaseContext.getConfig().getX_ScreenResolution(), BaseContext.getConfig().getY_ScreenResolution(), offScreenFbo.getAttachmentImageView(Attachment.ALBEDO), opaqueTransparencyBlendWaitSemaphores.put(1, transparencySemaphore.getHandle()); opaqueTransparencyBlending = new OpaqueTransparencyBlending(graphicsDevice, BaseContext.getConfig().getX_ScreenResolution(), BaseContext.getConfig().getY_ScreenResolution(), deferredLighting.getDeferredLightingSceneImageView(), BaseContext.getConfig().getX_ScreenResolution(), BaseContext.getConfig().getY_ScreenResolution(), displayImageView); 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();