CH 30 - how to do colored bloom?

Hello,
The book shows white bloom, but how do I do other colors?

thank you

Do you mean like this?

To get this image, I used the challenge project from Chapter 11, Maps and Materials. Before drawing the models in draw(in:), I first rendered the helmet in red to a texture. I then blurred the texture using a gaussian blur, as described in Chapter 30, Metal Performance Shaders. I then blitted the blurred texture into the view’s drawable texture and rendered the model as before on top of the blur.

Project:

Materials.zip (3.7 MB)

I had to remove the textures from this project so it came in under-size, but you can copy them in from the challenge project in Chapter 11, Maps and Materials

Thank you so much @caroline
I was thinking of doing a. neon effect
like this
bloom_scene

is it me, but when I change the background color (green) other than black I can see like a black fade out on the red
like the glow goes away and alpha is being blurred as well maybe

The black might be colour math of blending green and red? I don’t know what MPS is doing behind the scenes.

You might be able to achieve that pic with carefully positioned coloured spot or directional lights.

1 Like

Thank you I was able to achieved it by blurring the green background as well
and adding it to the original texture

1 Like