use of org.terasology.rendering.dag.nodes.DownSamplerForExposureNode in project Terasology by MovingBlocks.
the class WorldRendererImpl method addExposureNodes.
private void addExposureNodes(RenderGraph renderGraph) {
// TODO: Remove the hard coded value here
FBOConfig gBuffer2Config = displayResolutionDependentFBOs.getFboConfig(new SimpleUri("engine:fbo.gBuffer2"));
DownSamplerForExposureNode exposureDownSamplerTo16pixels = new DownSamplerForExposureNode(context, gBuffer2Config, displayResolutionDependentFBOs, FBO_16X16_CONFIG, immutableFBOs);
renderGraph.addNode(exposureDownSamplerTo16pixels, "exposureDownSamplerTo16pixels");
DownSamplerForExposureNode exposureDownSamplerTo8pixels = new DownSamplerForExposureNode(context, FBO_16X16_CONFIG, immutableFBOs, FBO_8X8_CONFIG, immutableFBOs);
renderGraph.addNode(exposureDownSamplerTo8pixels, "exposureDownSamplerTo8pixels");
DownSamplerForExposureNode exposureDownSamplerTo4pixels = new DownSamplerForExposureNode(context, FBO_8X8_CONFIG, immutableFBOs, FBO_4X4_CONFIG, immutableFBOs);
renderGraph.addNode(exposureDownSamplerTo4pixels, "exposureDownSamplerTo4pixels");
DownSamplerForExposureNode exposureDownSamplerTo2pixels = new DownSamplerForExposureNode(context, FBO_4X4_CONFIG, immutableFBOs, FBO_2X2_CONFIG, immutableFBOs);
renderGraph.addNode(exposureDownSamplerTo2pixels, "exposureDownSamplerTo2pixels");
DownSamplerForExposureNode exposureDownSamplerTo1pixel = new DownSamplerForExposureNode(context, FBO_2X2_CONFIG, immutableFBOs, FBO_1X1_CONFIG, immutableFBOs);
renderGraph.addNode(exposureDownSamplerTo1pixel, "exposureDownSamplerTo1pixel");
Node updateExposureNode = new UpdateExposureNode(context);
renderGraph.addNode(updateExposureNode, "updateExposureNode");
Node simpleBlendMaterialsNode = renderGraph.findNode("engine:simpleBlendMaterialsNode");
renderGraph.connect(simpleBlendMaterialsNode, exposureDownSamplerTo16pixels, exposureDownSamplerTo8pixels, exposureDownSamplerTo4pixels, exposureDownSamplerTo2pixels, exposureDownSamplerTo1pixel, updateExposureNode);
}
Aggregations