2
votes

In Directx 11 how can you make an outline glow effect for an object (yes, I do understand that I have to pass only this shader for the object), so it seems like it's kind of selected.

I have seen some examples, but they are all in .fx files, which I don't like.

I appreciate any kind of comment or answer on how this may be made.

1
If the shader is in an .fx file, just take it out? Or am I missing something.Jorge Israel Peña
As i understand, a pure shader is a bit different from effect files. Maybe I'm the dumb.Miguel P

1 Answers

2
votes

You should be able to just take the relevant stuff out of the fx file, the fx file just encapsulates pipeline state and some pixel/vertex shaders that typically represent one 'effect'.

Short of that, being new to graphics I find your question a bit ambiguous. However, I am familiar with one type of glow which is similar to that of Left 4 Dead (when you see the outline glows of players/objects through the walls). Here are some references:

More or less you draw the object to the stencil buffer, then you draw the object with the color glow you want into a separate buffer. You then run a Gaussian blur on the separate buffer. Finally you render the blurred buffer onto the screen, restricted by the stencil buffer.