0
\$\begingroup\$

How would one go about writing a pixel shader like this one in XNA 4.0?

http://www.youtube.com/watch?v=f1uZvurrhig&feature=related

\$\endgroup\$
1
  • \$\begingroup\$ This wouldn't be implemented via a pure pixel-shader. The most likely method is to render the scene to a texture, increase the contrast of that image and slowly fade it out over a few seconds. \$\endgroup\$ Commented Nov 23, 2011 at 12:37

2 Answers 2

1
\$\begingroup\$

Go to the shaders section of Microsoft's App Hub XNA samples and start poking around.

The bloom sample demonstrates a similar effect.

To achieve the effect from the video you would want to render the highlights to a buffer, which you then would clear gradually (using a semi-transparent quad), rather than clearing it completely each frame.

(Or you might bounce it between buffers, with a shader that does the appropriate fall-off.)

\$\endgroup\$
-2
\$\begingroup\$

How would one go about writing a pixel shader like this one in XNA 4.0?

  1. learn how pixel shaders work by researching websites, articles, books.
  2. follow various tutorials and gain familiarity and comfort level with HLSL.
  3. experiment. experiment. Ask specific questions about it. Play around till you get it.
\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .