use of org.terasology.rendering.dag.nodes.BlurredAmbientOcclusionNode 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);
}
use of org.terasology.rendering.dag.nodes.BlurredAmbientOcclusionNode in project Terasology by MovingBlocks.
the class WorldRendererImpl method add3dDecorationNodes.
private void add3dDecorationNodes(RenderGraph renderGraph) {
Node opaqueObjectsNode = renderGraph.findNode("engine:opaqueObjectsNode");
Node opaqueBlocksNode = renderGraph.findNode("engine:opaqueBlocksNode");
Node alphaRejectBlocksNode = renderGraph.findNode("engine:alphaRejectBlocksNode");
Node applyDeferredLightingNode = renderGraph.findNode("engine:applyDeferredLightingNode");
Node outlineNode = new OutlineNode(context);
renderGraph.addNode(outlineNode, "outlineNode");
renderGraph.connect(opaqueObjectsNode, outlineNode);
renderGraph.connect(opaqueBlocksNode, outlineNode);
renderGraph.connect(alphaRejectBlocksNode, outlineNode);
Node ambientOcclusionNode = new AmbientOcclusionNode(context);
renderGraph.addNode(ambientOcclusionNode, "ambientOcclusionNode");
renderGraph.connect(opaqueObjectsNode, ambientOcclusionNode);
renderGraph.connect(opaqueBlocksNode, ambientOcclusionNode);
renderGraph.connect(alphaRejectBlocksNode, ambientOcclusionNode);
// TODO: At this stage, it is unclear -why- this connection is required, we just know that it's required. Investigate.
renderGraph.connect(applyDeferredLightingNode, ambientOcclusionNode);
Node blurredAmbientOcclusionNode = new BlurredAmbientOcclusionNode(context);
renderGraph.addNode(blurredAmbientOcclusionNode, "blurredAmbientOcclusionNode");
renderGraph.connect(ambientOcclusionNode, blurredAmbientOcclusionNode);
}
Aggregations