Radeon ProRender

Bloom Post Process Effect

Post process effects are filters and image permutations that operate on a framebuffer. They are run automatically when the framebuffer is resolved. The bloom post process effect creates “glow” effects on very bright areas of the render.

//Need to normalize before calling the bloom post process effect.
	rpr_post_effect normalizationEff = 0;
	CHECK(rprContextCreatePostEffect(context, RPR_POST_EFFECT_NORMALIZATION, &normalizationEff));
	CHECK(rprContextAttachPostEffect(context, normalizationEff));

	rpr_post_effect postEffecrt = 0;
	CHECK(rprContextCreatePostEffect(context, RPR_POST_EFFECT_BLOOM, &postEffecrt));
	CHECK(rprContextAttachPostEffect(context, postEffecrt));
	CHECK(rprPostEffectSetParameter1f(postEffecrt, "weight", 1.0f));
	CHECK(rprPostEffectSetParameter1f(postEffecrt, "radius", 0.4f));
	CHECK(rprPostEffectSetParameter1f(postEffecrt, "threshold", 0.2f));

	//Progressively render an image.
	for (int i = 0; i < NUM_ITERATIONS; ++i)
	{
		CHECK(rprContextRender(context));
	}

	std::cout << "Rendering finished.\n";

	CHECK(rprContextResolveFrameBuffer(context, frame_buffer, frame_buffer_2, false)); //resolve postprocess