Archive 17/01/2023.

Bloom Effect

vivienneanthony

Hey

Did anyone get the bloom and ansiotropic(I think it’s how it spelled) effect working?

Vivienne

PS. Sorry about so many messages. It’s a lot of things going on at one time.

rasteron

Hey Vivienne,

Yes, AFAIK Bloom/HDR has been tested since way back on Google groups days. :wink:

I think you can test it now with this as or c++ demo.

I’m not sure about Anistropic filtering, I don’t see it on the shader files.

vivienneanthony

[quote=“rasteron”]Hey Vivienne,

Yes, AFAIK Bloom/HDR has been tested since way back on Google groups days. :wink:

I think you can test it now with this as or c++ demo.

I’m not sure about Anistrophic filtering, I don’t see it on the shader files.[/quote]

Ah. Ok

vivienneanthony

[quote=“rasteron”]Hey Vivienne,

Yes, AFAIK Bloom/HDR has been tested since way back on Google groups days. :wink:

I think you can test it now with this as or c++ demo.

I’m not sure about Anistropic filtering, I don’t see it on the shader files.[/quote]

I tried this and I seen no difference. Hmm. Maybe Chris would notice what’s wrong.

[code]/// Set up a viewport to the Renderer subsystem so that the 3D scene can be seen. We need to define the scene and the camera
/// at minimum. Additionally we could configure the viewport screen size and the rendering path (eg. forward / deferred) to
/// use, but now we just use full screen and default render path configured SetOrthographic ( in the engine command line options
SharedPtr viewport(new Viewport(context_, scene_, cameraNode_->GetComponent()));
renderer->SetViewport(0, viewport);

SharedPtr<RenderPath> effectRenderPath = viewport->GetRenderPath()->Clone();
effectRenderPath->Append(cache->GetResource<XMLFile>("PostProcess/Bloom.xml"));

/// Make the bloom mixing parameter more pronounced
effectRenderPath->SetShaderParameter("BloomMix", Vector2(0.9f, 0.6f));
effectRenderPath->SetEnabled("Bloom", false);
viewport->SetRenderPath(effectRenderPath);[/code]

In the code that toggles.

[code] /// parameters for debug related command
if(argument[1]==“bloom”)
{
RenderPath* effectRenderPath = GetSubsystem()->GetViewport(0)->GetRenderPath();

    effectRenderPath->ToggleEnabled("Bloom");

}
[/code]

Header file

[code] /// The UI’s root UIElement.
SharedPtr uiRoot_;
SharedPtr viewport;
SharedPtr effectRenderPath;

[/code]

franck22000

Well maybe if you were setting:

To

It would work better :slight_smile:

vivienneanthony

[quote=“franck22000”]Well maybe if you were setting:

To

It would work better :slight_smile:[/quote]
I thought that was basically the toggle. Even if the change it did not work.

reattiva

The example 09_MultipleViewports.as has the bloom effect.

vivienneanthony

I’ll look at it again. That’s what I based my code from.

vivienneanthony

I got the bloom effect working. I’ll play with the FXAA ones once I change the source to be Urho 1.32 friendly.