# CH 30 - how to do colored bloom?

**URL:** <https://forums.kodeco.com/t/ch-30-how-to-do-colored-bloom/181524>\
**Category:** Metal by Tutorials\
**Created:** [December 9, 2022, 12:00am UTC](https://forums.kodeco.com/t/ch-30-how-to-do-colored-bloom/181524 "2022-12-09T00:00:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![masaldana2](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/masaldana2/32/107256_2.png) [@masaldana2](https://forums.kodeco.com/u/masaldana2)\
**Post date:** [December 9, 2022, 12:00am UTC](https://forums.kodeco.com/t/ch-30-how-to-do-colored-bloom/181524/1 "2022-12-09T00:00:51Z")

</div>

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

thank you

---

<div class="post-metadata">

**Author:** ![caroline](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/caroline/32/111867_2.png) [@caroline](https://forums.kodeco.com/u/caroline)\
**Post date:** [December 10, 2022, 4:47am UTC](https://forums.kodeco.com/t/ch-30-how-to-do-colored-bloom/181524/2 "2022-12-10T04:47:26Z")

</div>

Do you mean like this?

 ![Screenshot 2022-12-10 at 3.38.13 pm](https://files.chunter.kodeco.com/original/3X/f/0/f047b04cbc301e94b5164ffb12eb1ca929c16f21.jpeg)

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](https://forums.kodeco.com/uploads/short-url/hidMiJ6ZSX8dQDRokdTP6WqvEI8.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

---

<div class="post-metadata">

**Author:** ![masaldana2](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/masaldana2/32/107256_2.png) [@masaldana2](https://forums.kodeco.com/u/masaldana2)\
**Post date:** [December 10, 2022, 5:53am UTC](https://forums.kodeco.com/t/ch-30-how-to-do-colored-bloom/181524/3 "2022-12-10T05:53:30Z")

</div>

Thank you so much @caroline  
I was thinking of doing a. neon effect  
like this  
 ![bloom_scene](https://files.chunter.kodeco.com/original/3X/e/8/e80a7ab8ac8a1186d353d5118581eb561c5cf679.png)

 ![IMG_43D9C559A9DE-1](https://files.chunter.kodeco.com/original/3X/d/6/d6f2a504ac5928db614efe417a4441335e9bdc97.jpeg)

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

---

<div class="post-metadata">

**Author:** ![caroline](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/caroline/32/111867_2.png) [@caroline](https://forums.kodeco.com/u/caroline)\
**Post date:** [December 10, 2022, 7:32am UTC](https://forums.kodeco.com/t/ch-30-how-to-do-colored-bloom/181524/4 "2022-12-10T07:32:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![masaldana2](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/masaldana2/32/107256_2.png) [@masaldana2](https://forums.kodeco.com/u/masaldana2)\
**Post date:** [December 23, 2022, 11:46pm UTC](https://forums.kodeco.com/t/ch-30-how-to-do-colored-bloom/181524/5 "2022-12-23T23:46:54Z")

</div>

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