• Shawn Hargreaves Blog

    Bitmap fonts in XNA

    • 13 Comments
    The XNA font system is most commonly used to extract data from TrueType fonts described in XML files, but it is also capable of grabbing character images directly from hand drawn bitmaps. TrueType fonts are convenient, but you may sometimes find yourself...
  • Shawn Hargreaves Blog

    The standard lighting rig

    • 12 Comments
    Question: what important things do photographers and cinematographers know about lighting? Question: why does BasicEffect support exactly three lights? Answer: the standard lighting rig! Many years ago photographers discovered that a single light was...
  • Shawn Hargreaves Blog

    Specularity

    • 3 Comments
    BasicEffect uses the standard Blinn-Phong shading model, which combines both diffuse and specular light. Tweaking the diffuse part is pretty easy. Just set the BasicEffect.DiffuseColor property to the color of your object, or to white if your model is...
  • Shawn Hargreaves Blog

    Hysteresis

    • 10 Comments
    Games often have to make discrete decisions based on continuously varying analog input values. This happens a lot when making animation systems respond to controller inputs: if (speed > 0.7) ShowRunAnimation(); else if (speed > 0.1) ShowWalkAnimation...
  • Shawn Hargreaves Blog

    Unicode fonts in XNA

    • 3 Comments
    The XNA font system supports full Unicode character sets. The default XML font description includes only characters 0x20 to 0x7E, which corresponds to the "Basic Latin" Unicode range, but you can easily add other character regions by modifying the XML...
  • Shawn Hargreaves Blog

    BasicEffect.PreferPerPixelLighting

    • 1 Comments
    One of the new features in the next release of the XNA Framework is the addition of per-pixel lighting support in BasicEffect. In the original version of the framework, BasicEffect always evaluated its lighting per-vertex. That means for every vertex...
  • Shawn Hargreaves Blog

    Equalizing artwork

    • 1 Comments
    Great albums depend on more than just the individual notes. After the musicians finish recording their parts the producer takes over, adjusting volume levels and equalization settings, or maybe adding a bit of reverb to make everything sit well in the...
  • Shawn Hargreaves Blog

    A calculator called Eric

    • 5 Comments
    Please don't tell any of the guys here at Microsoft, but back in 2005 when I interviewed for my job on the XNA team, I had never actually written anything using .NET! After the interview but before I accepted the job, I decided I had better learn C#...
  • Shawn Hargreaves Blog

    Profiling Thursday

    • 0 Comments
    Everyone is writing about how to use profiling tools today. Must be something in the water... SwampThingTom explains how to measure CPU performance to make sure you don't waste time optimizing parts of your program that weren't slow in the first place...
  • Shawn Hargreaves Blog

    Any language you like (as long as it's at build time)

    • 2 Comments
    The XNA Framework only supports C#, at least if you want to run on Xbox or use the content pipeline. Or does it? It is true that our GSE IDE is only for C#. But content pipeline importers and processors are just regular managed assemblies, so you can...
  • Shawn Hargreaves Blog

    Evolved bitmap fonts

    • 1 Comments
    Within days of releasing our bitmap font maker utility , people are finding ways to improve it. Patrick created a Codeplex project that adds automatic outlining and shadowing filters. Ziggyware posted an article showing how to support more output formats...
Page 1 of 1 (11 items)