Real-Time Glow
Original place:
http://xreal.51.net/game/realtimeglow.htm
The so-called glow is some halo appears next to an object. Usually, it will produce this phenomenon in one of themselves or relatively dark objects in the scene. Moreover, these objects seem to be more bright than itself. In fact, Glow is very simple. I am a simple description here:
1: Rendering the scene according to the usual mode.
2: Rendering only objects with a Glow effect. At this time, we rendered it into a texture, this texture can be smaller than viewport. When rendering, we no longer use Diffuse information, but use Glow information. For example, a person, we may want his face with the Glow to be heavy. And other places are small. In a building, there is glow in the light on the light. And there are no other places. We can save this information in a normal Diffuse texture (with Diffuse itself, or Alpha channel), you can use a dedicated Glow information texture. After rendering this texture, the texture saved is additional brightness information on the screen of the Glow object.
3: Do BLUR in 2 textures, and make a certain degree of blur along the X-Y direction. The Glow information that is originally only on the object is diffused on both sides. Of course, the object can be stretched in the normal direction when rendering 2. (I have used two methods).
4: Finally, the texture processed after step 3 is attached to the screen, that is, the Glow information is retained back to the scene. Apply texture by adding.
Detailed Real-Time Glow, see GPU GEMS
Here is the example I use renderMonkey rendering
http://xreal.51.net/download/rtglow.rar
http://xreal.51.net/game/glow/glow1.jpg
http://xreal.51.net/game/glow/glow2.jpg
http://xreal.51.net/game/glow/glow3.jpg
XheartBlue-2005-3-7