Jump to content
  • Advertisement
Sign in to follow this  
OrangyTang

Blur filter for textures (for glow/bloom)

This topic is 5404 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

You've probably all seen the glow/bloom effects first seen in the Tron game and used so well in Prince Of Persia. I've already got this working fine, with two methods for blurring the glow image: 1. Autogenerated mipmaps and successive mip layer rendering. 2. A more conventional multisampling blur with lots of texture blending. Method 1 is great, but because the auto mipmap generation typically only uses a box filter the quality can suffer. Method 2 does a proper gaussian blur which looks nicer. To try and improve performance I want to change method two to use multitexturing, instead of single texturing it currently uses. However with single texturing I use the vertex colour for the sample weight, with multitexturing this isn't an option - how can I set a per-texture weight with multitexturing? Preferably without using anything vendor specific extension, although I can always drop back to my regular single texture approach if an extension isn't avalible. Cheers

Share this post


Link to post
Share on other sites
Advertisement
If you're using shaders, you can pack 4 different weights into the 4-component vertex colour, or use attributes.

Or, with texture_env_combine, you can define a colour for each stage and blend that in somehow.

Share this post


Link to post
Share on other sites
I'd rather not using shaders, ideally I'd like a solution that'd work for GeForce 1 and up. I've not used texture_env_combine, do you happen to know any good sources of information on it?

Share this post


Link to post
Share on other sites
After much searching, this post seems to describe the kind of thing I'm after. However at the moment I'm getting some odd results depending on how many texture units are used (almost like my tex coords are wrong, but I've already checked them). Which means I'm probably evaluating that equation wrong or my weights are bad to start with.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!