Jump to content
  • Advertisement
Sign in to follow this  

Glow on a wireframed triangle?

This topic is 2987 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

Hi there. You guys at GameDev have helped me a lot so far, but I still need to know one thing. How can I add a glow effect to a triangle rendered in wire-frame mode? I've seen it done before. I've looked at different HLSL glow shaders, but they all require texture coordinates to work. I don't use textures, but materials.

Share this post


Link to post
Share on other sites
Advertisement
A bloom pass operates on the current render target, i don't see why having the model drawn in wireframe would be an issue so long as the brightness pass picks up the wireframe.

Share this post


Link to post
Share on other sites
AFAIK bloom is just a blur effect.
You render the wireframe to a texture (with bloom color), and you apply post process blur to that texture (color will be the bloom color, apply blur to the alpha layer). Than compose that to the image somehow.

Share this post


Link to post
Share on other sites
All this really means is that you change the render target from the default one to one you create yourself, draw your primary scene to this (the one that needs blooming). You use that as the source image for the bloom pass and then combine the bloom output with the source image to the back buffer.

Share this post


Link to post
Share on other sites
Quote:
Original post by Mathy
Wouldn't converting the wireframe into a texture be very unoptimized? Isn't there a smarter approach?


If you look on the nVidia developer site you'll find a number of demos that use this and related approaches. I don't know if it's the best use of hardware, but it is commonly done. On the plus side, it's relatively easy, and will look good.

Your other option is billboarding. Your could for instance render your lines as camera-facing quads with pre-blurred line textures (with, say, rounded ends) and e.g. additive blending. The downsides here are that (1) now where your lines overlap at vertices, you'll get brighter glow, in proportion to the number of edges sharing that vertex (one can imagine ways around that though, say by subtractively-blending circular billboards at the vertices to cancel this effect), and (2) wherever your quads intersect or are occluded by other objects, and this is handled by the z-buffer, you will get sharp rather than blurred edges.

It's conceivable that effects #1 and #2 are even desirable; I don't know...

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!