UPBGE Bloom Shader

That would be great. Im trying to apply this to a scene of mine. So I add the custom filters to my camera as actuators, set a material to emissive, is there anything else?

you have to append the script ‘shader.py’.
set the python controller to module and type in the controller: shader.run

name the 2dfilter actuators as ‘BufferA’ and ‘Image’.
turn on HDR HALF in render tab under System.

or you can use with HDR NONE, but them you have to adjust the variables ‘intensity’ and ‘power’ to act as a threshold to the brighter values.

let me know if you got it.

1 Like

I am trying to imitate eevee bloom in the 2.5.0
without using render attachments.
my attempt to TheFinalBloom.blend (96.6 KB)

This works great in 0.2.5! :smile:

1 Like

How to change the colorRange value in runtime?
I see that line 9 has a # at start.
I don’t know much of glsl language.
Thanks!

you don’t.
in glsl the hash symbol is not a comment.

unless you
set a uniform float in the shader.py script
and make colorRange as that uniform in the image.fs script

setUniform1f ( name , fx )

Parameters: * name ( string ) – the uniform name

  • fx ( float ) – Uniform value