Skip to main content
GameDev.net gamedev.net
🔒 Locked

Bloom / glow

Started by patrrr Aug 12, 2006 at 9:27 AM 2 replies 1.5k views
Original Post
patrrr
patrrr
Hello, I've got a question about implementating a glow or "bloom" effect, I know that you basically render the scene as usual, then you render it again but with different textures which tell where there should be glow. ("glowmaps"?) The second pass is rendered onto a texture and a blur effect is applied. But how do you apply that texture to the scene? Using an orthonormal projection? And how would you do this in shaders? Thanks.
m4gnus
m4gnus
you render a fullscreen quad and combine the bloom texture and the scene without bloom with a pixelshader.

"There are 10 types of people in the world... those who understand binary and those who don't."
OrangyTang
OrangyTang
Quote:
Original post by m4gnus
you render a fullscreen quad and combine the bloom texture and the scene without bloom with a pixelshader.

Typically you don't even need a shader, the final result is usually just done as finalScene = originalScene + blurResult. This can be done with simple additive blending or multitexturing (depending on what you've already got in the framebuffer to work with).
superpig
superpig
Quote:
Original post by patrrr
But how do you apply that texture to the scene?
Using an orthonormal projection?


When you render the second pass, all geometry is projected into screenspace already. You don't need to project the result again, you just render it in screenspace.
Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.