[SlimDX] Some kind of glow effect?

Started by
4 comments, last by jpetrie 14 years, 1 month ago
Is it possible to render some kind of glow effect through a vertex or pixel shader or other methods? If so, how? I am using SlimDX.
Advertisement
Moving to graphics programming.

Yes, it is possible. Try asking Google about "glow shaders" or similar things. There is plenty of information on the subject out there.
Alright, so let's say I want to use the Glow Shader code here, that I had already found earlier:

http://www.steelskies.com/article/4/directx-shader-effects#

How do I implement that into SlimDX? I already know a lot about how HSLS works, but how do I use it correctly?
It depends -- you have to look at the shader's code, see what kinds of parameters it expects, and then give those parameters to the Effect object you created with the shader code before rendering with that effect.
Quote:Original post by jpetrie
It depends -- you have to look at the shader's code, see what kinds of parameters it expects, and then give those parameters to the Effect object you created with the shader code before rendering with that effect.


It wants some texture coordinates. However, I'm not using textures. Actually, it's a wireframed model, and the lines generated by the wireframe are the ones I need to glow.
Well, you're going to have quite a bit of work ahead of you then. You should focus on reading and understanding the concepts behind the technique they are employing, then you can better understand how to adapt it to your own code.

Many glow effects are implemented by rendering glow sources (in your case, the lines) into a texture, and then blurring that texture and using it in a second rendering pass (for example). I know of no (practical) way to make a glow effect without using textures or extra geometry though -- and of the two of those, the latter is likely to be more efficient.

This topic is closed to new replies.

Advertisement