use of org.terasology.rendering.dag.nodes.AmbientOcclusionNode 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