Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

DirectXTK October 2012 release

Sign in to follow this  


The DirectX Tool Kit has been updated with two new features:

  • Added a ScreenGrab module for easily saving rendertarget contents into .dds or other image formats
  • Extended GeometricPrimitive.h with a new CreateGeoSphere method (thanks to my colleague Adrian Tsai for contributing this code!)

    There are also some minor tweaks and bugfixes:

    • Moved DDSTextureLoader and WICTextureLoader into the DirectX C++ namespace
    • Renamed project files for better consistency
    • Extended WICTextureLoader to support Windows 8 96bpp floating point formats
    • Updated Win32 desktop projects to use Windows Vista (0x0600) rather than Windows 7 (0x0601) APIs
    • Tweaked SpriteBatch.cpp to workaround an ARM NEON compiler codegen bug

      So what is this GeoSphere thingie, you may well ask, and why might it be better than a plain old fashioned UV sphere primitive? Shamelessly plagiarizing an explanation from Adrian:
      Generally speaking, geospheres are more efficient than non-geodesic spheres (which are typically generated by using rings of vertices along the latitudes/longitudes of the sphere). In an ideal geosphere each triangle has the same area, which means an even distribution of vertices around the sphere. This means geospheres can give better visual quality at the same vertex count.
      My implementation approximates an ideal geosphere by recursively subdividing a starting shape - in this case an octahedron. Almost any regular polyhedron can be used, but octahedrons or icosahedrons typically give best results. Starting with an icosahedron would give slightly more accurate results (i.e. it would produce an output closer to an ideal geosphere) but would make the implementation more complex.
      Each successive subdivision increases the number of vertices by a factor of four. Hence the total number of vertices is approximately 4^(N+1), where N is the number of tessellations specified in CreateGeoSphere. A value of 3 or 4 is usually enough to give good results.

      Tessellation = 11
      276 vertices

      Tessellation = 3
      277 vertices

      8875.image_5F00_thumb_5F00_067B362E.png 6523.image_5F00_thumb_5F00_0D2E3FB1.png

Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!