Why purple?

One of the things I’m going to try to do this year is write more on my blog.  The publisher for my books is hoping I’ll write something new for them this year as well, although at the moment I don’t know if I’d have the time, or what I’d write about anyway..  Anyone have suggestions on topics they’d like me to cover in a book or a blog post?  Shawn normally goes a great job staying ahead of the curve so the possibilties of topics diminishes some. =)

So for now I’m just going to post a random anecdote that was asked in our internal alias one day..  Why does the framework clear the targets (render targets, back buffer) to purple when RenderTargetUsage.DiscardContents is turned on?

When I originally implemented that feature, I wanted something that jumped out at me and was extremely noticeable.  I picked the brightest, most obnoxious shade of neon green I could.  It did the trick, it was instantly noticeable when it was there.  As time went on though, I kept seeing it all the time, day in, day out, over and over again.  It irritated me something fierce and eventually I decided I just had to change it to something much less obnoxious, so I picked a dark purple.  The intention was to switch it back to the bright neon green before we shipped to ensure everyone got to experience the joy that was that color.

As time went on though, we all got used to the purple.  It was pretty quickly and easily recognized and that was the goal for the clear to begin with.  Why torture everyone’s eyes and have them all hate me when everyone is soothed by the purple?

So, why purple?  To avoid the hate mail that would have come from the original neon green!

Leave a Reply

Your email address will not be published. Required fields are marked *