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);
}
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);
}
Aggregations