use of org.terasology.rendering.dag.nodes.PrePostCompositeNode in project Terasology by MovingBlocks.
the class WorldRendererImpl method addPrePostProcessingNodes.
private void addPrePostProcessingNodes(RenderGraph renderGraph) {
// Pre-post-processing, just one more interaction with 3D data (semi-transparent objects, in SimpleBlendMaterialsNode)
// and then it's 2D post-processing all the way to the image shown on the display.
Node overlaysNode = renderGraph.findNode("engine:overlaysNode");
Node finalHazeNode = renderGraph.findNode("engine:finalHazeNode");
Node chunksRefractiveReflectiveNode = renderGraph.findNode("engine:chunksRefractiveReflectiveNode");
Node applyDeferredLightingNode = renderGraph.findNode("engine:applyDeferredLightingNode");
Node outlineNode = renderGraph.findNode("engine:outlineNode");
Node blurredAmbientOcclusionNode = renderGraph.findNode("engine:blurredAmbientOcclusionNode");
Node prePostCompositeNode = new PrePostCompositeNode(context);
renderGraph.addNode(prePostCompositeNode, "prePostCompositeNode");
renderGraph.connect(overlaysNode, prePostCompositeNode);
renderGraph.connect(finalHazeNode, prePostCompositeNode);
renderGraph.connect(chunksRefractiveReflectiveNode, prePostCompositeNode);
renderGraph.connect(applyDeferredLightingNode, prePostCompositeNode);
renderGraph.connect(outlineNode, prePostCompositeNode);
renderGraph.connect(blurredAmbientOcclusionNode, prePostCompositeNode);
Node simpleBlendMaterialsNode = new SimpleBlendMaterialsNode(context);
renderGraph.addNode(simpleBlendMaterialsNode, "simpleBlendMaterialsNode");
renderGraph.connect(prePostCompositeNode, simpleBlendMaterialsNode);
}
Aggregations