Search in sources :

Example 1 with InitialPostProcessingNode

use of org.terasology.rendering.dag.nodes.InitialPostProcessingNode in project Terasology by MovingBlocks.

the class WorldRendererImpl method addInitialPostProcessingNodes.

private void addInitialPostProcessingNodes(RenderGraph renderGraph) {
    Node simpleBlendMaterialsNode = renderGraph.findNode("engine:simpleBlendMaterialsNode");
    Node one8thScaleBlurredBloomNode = renderGraph.findNode("engine:one8thScaleBlurredBloomNode");
    // Light shafts
    Node lightShaftsNode = new LightShaftsNode(context);
    renderGraph.addNode(lightShaftsNode, "lightShaftsNode");
    renderGraph.connect(simpleBlendMaterialsNode, lightShaftsNode);
    // Adding the bloom and light shafts to the gBuffer
    Node initialPostProcessingNode = new InitialPostProcessingNode(context);
    renderGraph.addNode(initialPostProcessingNode, "initialPostProcessingNode");
    renderGraph.connect(lightShaftsNode, initialPostProcessingNode);
    renderGraph.connect(one8thScaleBlurredBloomNode, initialPostProcessingNode);
}
Also used : LightShaftsNode(org.terasology.rendering.dag.nodes.LightShaftsNode) DeferredMainLightNode(org.terasology.rendering.dag.nodes.DeferredMainLightNode) PrePostCompositeNode(org.terasology.rendering.dag.nodes.PrePostCompositeNode) ShadowMapNode(org.terasology.rendering.dag.nodes.ShadowMapNode) OutlineNode(org.terasology.rendering.dag.nodes.OutlineNode) InitialPostProcessingNode(org.terasology.rendering.dag.nodes.InitialPostProcessingNode) BlurredAmbientOcclusionNode(org.terasology.rendering.dag.nodes.BlurredAmbientOcclusionNode) OpaqueBlocksNode(org.terasology.rendering.dag.nodes.OpaqueBlocksNode) AmbientOcclusionNode(org.terasology.rendering.dag.nodes.AmbientOcclusionNode) FinalPostProcessingNode(org.terasology.rendering.dag.nodes.FinalPostProcessingNode) UpdateExposureNode(org.terasology.rendering.dag.nodes.UpdateExposureNode) LightShaftsNode(org.terasology.rendering.dag.nodes.LightShaftsNode) AlphaRejectBlocksNode(org.terasology.rendering.dag.nodes.AlphaRejectBlocksNode) Node(org.terasology.rendering.dag.Node) DeferredPointLightsNode(org.terasology.rendering.dag.nodes.DeferredPointLightsNode) WorldReflectionNode(org.terasology.rendering.dag.nodes.WorldReflectionNode) ToneMappingNode(org.terasology.rendering.dag.nodes.ToneMappingNode) BufferClearingNode(org.terasology.rendering.dag.nodes.BufferClearingNode) HighPassNode(org.terasology.rendering.dag.nodes.HighPassNode) BloomBlurNode(org.terasology.rendering.dag.nodes.BloomBlurNode) OpaqueObjectsNode(org.terasology.rendering.dag.nodes.OpaqueObjectsNode) OutputToHMDNode(org.terasology.rendering.dag.nodes.OutputToHMDNode) LateBlurNode(org.terasology.rendering.dag.nodes.LateBlurNode) ApplyDeferredLightingNode(org.terasology.rendering.dag.nodes.ApplyDeferredLightingNode) BackdropReflectionNode(org.terasology.rendering.dag.nodes.BackdropReflectionNode) DownSamplerForExposureNode(org.terasology.rendering.dag.nodes.DownSamplerForExposureNode) HazeNode(org.terasology.rendering.dag.nodes.HazeNode) RefractiveReflectiveBlocksNode(org.terasology.rendering.dag.nodes.RefractiveReflectiveBlocksNode) SimpleBlendMaterialsNode(org.terasology.rendering.dag.nodes.SimpleBlendMaterialsNode) OutputToScreenNode(org.terasology.rendering.dag.nodes.OutputToScreenNode) BackdropNode(org.terasology.rendering.dag.nodes.BackdropNode) OverlaysNode(org.terasology.rendering.dag.nodes.OverlaysNode) InitialPostProcessingNode(org.terasology.rendering.dag.nodes.InitialPostProcessingNode)

Example 2 with InitialPostProcessingNode

use of org.terasology.rendering.dag.nodes.InitialPostProcessingNode in project Terasology by MovingBlocks.

the class WorldRendererImpl method addFinalPostProcessingNodes.

private void addFinalPostProcessingNodes(RenderGraph renderGraph) {
    Node initialPostProcessingNode = renderGraph.findNode("engine:initialPostProcessingNode");
    Node updateExposureNode = renderGraph.findNode("engine:updateExposureNode");
    Node toneMappingNode = new ToneMappingNode(context);
    renderGraph.addNode(toneMappingNode, "toneMappingNode");
    renderGraph.connect(updateExposureNode, toneMappingNode);
    renderGraph.connect(initialPostProcessingNode, toneMappingNode);
    // Late Blur nodes: assisting Motion Blur and Depth-of-Field effects
    FBOConfig firstLateBlurConfig = new FBOConfig(FIRST_LATE_BLUR_FBO_URI, HALF_SCALE, FBO.Type.DEFAULT);
    FBO firstLateBlurFbo = displayResolutionDependentFBOs.request(firstLateBlurConfig);
    LateBlurNode firstLateBlurNode = new LateBlurNode(context, displayResolutionDependentFBOs.get(ToneMappingNode.TONE_MAPPING_FBO_URI), firstLateBlurFbo);
    renderGraph.addNode(firstLateBlurNode, "firstLateBlurNode");
    FBOConfig secondLateBlurConfig = new FBOConfig(SECOND_LATE_BLUR_FBO_URI, HALF_SCALE, FBO.Type.DEFAULT);
    FBO secondLateBlurFbo = displayResolutionDependentFBOs.request(secondLateBlurConfig);
    LateBlurNode secondLateBlurNode = new LateBlurNode(context, firstLateBlurFbo, secondLateBlurFbo);
    renderGraph.addNode(secondLateBlurNode, "secondLateBlurNode");
    Node finalPostProcessingNode = new FinalPostProcessingNode(context);
    renderGraph.addNode(finalPostProcessingNode, "finalPostProcessingNode");
    renderGraph.connect(toneMappingNode, firstLateBlurNode, secondLateBlurNode, finalPostProcessingNode);
}
Also used : FBOConfig(org.terasology.rendering.opengl.FBOConfig) SwappableFBO(org.terasology.rendering.opengl.SwappableFBO) FBO(org.terasology.rendering.opengl.FBO) LateBlurNode(org.terasology.rendering.dag.nodes.LateBlurNode) FinalPostProcessingNode(org.terasology.rendering.dag.nodes.FinalPostProcessingNode) DeferredMainLightNode(org.terasology.rendering.dag.nodes.DeferredMainLightNode) PrePostCompositeNode(org.terasology.rendering.dag.nodes.PrePostCompositeNode) ShadowMapNode(org.terasology.rendering.dag.nodes.ShadowMapNode) OutlineNode(org.terasology.rendering.dag.nodes.OutlineNode) InitialPostProcessingNode(org.terasology.rendering.dag.nodes.InitialPostProcessingNode) BlurredAmbientOcclusionNode(org.terasology.rendering.dag.nodes.BlurredAmbientOcclusionNode) OpaqueBlocksNode(org.terasology.rendering.dag.nodes.OpaqueBlocksNode) AmbientOcclusionNode(org.terasology.rendering.dag.nodes.AmbientOcclusionNode) FinalPostProcessingNode(org.terasology.rendering.dag.nodes.FinalPostProcessingNode) UpdateExposureNode(org.terasology.rendering.dag.nodes.UpdateExposureNode) LightShaftsNode(org.terasology.rendering.dag.nodes.LightShaftsNode) AlphaRejectBlocksNode(org.terasology.rendering.dag.nodes.AlphaRejectBlocksNode) Node(org.terasology.rendering.dag.Node) DeferredPointLightsNode(org.terasology.rendering.dag.nodes.DeferredPointLightsNode) WorldReflectionNode(org.terasology.rendering.dag.nodes.WorldReflectionNode) ToneMappingNode(org.terasology.rendering.dag.nodes.ToneMappingNode) BufferClearingNode(org.terasology.rendering.dag.nodes.BufferClearingNode) HighPassNode(org.terasology.rendering.dag.nodes.HighPassNode) BloomBlurNode(org.terasology.rendering.dag.nodes.BloomBlurNode) OpaqueObjectsNode(org.terasology.rendering.dag.nodes.OpaqueObjectsNode) OutputToHMDNode(org.terasology.rendering.dag.nodes.OutputToHMDNode) LateBlurNode(org.terasology.rendering.dag.nodes.LateBlurNode) ApplyDeferredLightingNode(org.terasology.rendering.dag.nodes.ApplyDeferredLightingNode) BackdropReflectionNode(org.terasology.rendering.dag.nodes.BackdropReflectionNode) DownSamplerForExposureNode(org.terasology.rendering.dag.nodes.DownSamplerForExposureNode) HazeNode(org.terasology.rendering.dag.nodes.HazeNode) RefractiveReflectiveBlocksNode(org.terasology.rendering.dag.nodes.RefractiveReflectiveBlocksNode) SimpleBlendMaterialsNode(org.terasology.rendering.dag.nodes.SimpleBlendMaterialsNode) OutputToScreenNode(org.terasology.rendering.dag.nodes.OutputToScreenNode) BackdropNode(org.terasology.rendering.dag.nodes.BackdropNode) OverlaysNode(org.terasology.rendering.dag.nodes.OverlaysNode) ToneMappingNode(org.terasology.rendering.dag.nodes.ToneMappingNode)

Aggregations

Node (org.terasology.rendering.dag.Node)2 AlphaRejectBlocksNode (org.terasology.rendering.dag.nodes.AlphaRejectBlocksNode)2 AmbientOcclusionNode (org.terasology.rendering.dag.nodes.AmbientOcclusionNode)2 ApplyDeferredLightingNode (org.terasology.rendering.dag.nodes.ApplyDeferredLightingNode)2 BackdropNode (org.terasology.rendering.dag.nodes.BackdropNode)2 BackdropReflectionNode (org.terasology.rendering.dag.nodes.BackdropReflectionNode)2 BloomBlurNode (org.terasology.rendering.dag.nodes.BloomBlurNode)2 BlurredAmbientOcclusionNode (org.terasology.rendering.dag.nodes.BlurredAmbientOcclusionNode)2 BufferClearingNode (org.terasology.rendering.dag.nodes.BufferClearingNode)2 DeferredMainLightNode (org.terasology.rendering.dag.nodes.DeferredMainLightNode)2 DeferredPointLightsNode (org.terasology.rendering.dag.nodes.DeferredPointLightsNode)2 DownSamplerForExposureNode (org.terasology.rendering.dag.nodes.DownSamplerForExposureNode)2 FinalPostProcessingNode (org.terasology.rendering.dag.nodes.FinalPostProcessingNode)2 HazeNode (org.terasology.rendering.dag.nodes.HazeNode)2 HighPassNode (org.terasology.rendering.dag.nodes.HighPassNode)2 InitialPostProcessingNode (org.terasology.rendering.dag.nodes.InitialPostProcessingNode)2 LateBlurNode (org.terasology.rendering.dag.nodes.LateBlurNode)2 LightShaftsNode (org.terasology.rendering.dag.nodes.LightShaftsNode)2 OpaqueBlocksNode (org.terasology.rendering.dag.nodes.OpaqueBlocksNode)2 OpaqueObjectsNode (org.terasology.rendering.dag.nodes.OpaqueObjectsNode)2