Archive for category DirectX Programming
The SDX SpriteTextRenderer now supports SharpDX
Posted by nicoschertler in .Net Programming, DirectX Programming on May 4, 2014
As already mentioned in several posts, I’ve been developing a library for rendering sprites and text with DirectX 11. Up to now this library was available exclusively for SlimDX applications. Up to now. With the help of the newest member of the STR team, Lior Lahav, the library was able to evolve to a framework, […]
SlimDX SpriteTextRenderer Release 1.1
Posted by nicoschertler in .Net Programming, DirectX Programming on September 23, 2013
The SpriteTextRenderer is a library that aids in the creation of 2D elements in DirectX 11 (SlimDX) appplications. Thanks to some user posts I was able to improve the SlimDX SpriteTextRenderer. Topmost, some bugs in the font layouting system could be fixed. If you’re still looking for a sprite and text renderer for DirectX 11, […]
Simulating a day’s sky
Posted by nicoschertler in .Net Programming, DirectX Programming, Game Algorithms on April 3, 2013
A nice sky is very important for most games. However, creating a good-looking one is not that easy. Researchers of the University of Utah have found a good approximation for the sky during a day (Paper). In this article I am going to explain the fundamentals of this algorithm. The complete project can be downloaded […]
Managing input layouts
Posted by nicoschertler in .Net Programming, DirectX Programming on March 28, 2013
In my last post I showed how to use .Net attributes to define shader variables. This post will be about the management of input layouts. Input layouts define how the graphics card should interpret vertex data and how to map fields to the shader’s variables. Usually you send vertices in form of arrays of structs […]
Conveniently managing shader variables
Posted by nicoschertler in .Net Programming, DirectX Programming on March 25, 2013
If you use DirectX 11, particularly SlimDX, you have the choice to use the Effect Framework to manage your shaders. Then, instead of setting constant buffers you can set shader settings with the help of EffectVariables. Here is a sample for using those variables: However, setting up these variables can be pretty annoying because mostly […]
Rendering sprites and text with SlimDX / DX 11
Posted by nicoschertler in .Net Programming, DirectX Programming on July 23, 2012
Up to versions 9 of DirectX, the API contained quite broad support for 2D rendering. However, in DirectX 10 this has become less and in DirectX 11 there is virtually no support for drawing sprites and text on the screen. However, most DirectX applications need some kind of 2D rendering to display a graphical user […]
DirectX and Matrices
Posted by nicoschertler in DirectX Programming, Game Algorithms on January 27, 2012
Fundamentals In DirectX, in most cases a matrix is a 4×4 row-major matrix with float components that can be visualized as a table: Note that matrices are column-major in OpenGL. While the general content of this article also applies to OpenGL, both vectors and matrices are transposed, which results in a reversed multiplication order. Keep […]
HLSL 4 – Calls to user defined functions will crash
Posted by nicoschertler in DirectX Programming on January 2, 2012
In one of my current projects I have been confronted with a weird problem of the Effect framework: A syntactically and semantically valid shader would not render anything. But let’s start at the beginning. The application I have been working on is a DirectX 11 program written in C++ that uses HLSL 4.0 shaders. My […]