Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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

share|improve this question
    
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. –  Jonathan Dickinson Nov 23 '11 at 12:37
add comment

2 Answers

up vote 1 down vote accepted

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.)

share|improve this answer
add comment

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.
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.