Monthly Archives: April 2012

More text stuff.

Here’s a sample of text rendering in Gorgon 2.0 (Dorian).  It’s rendering 16,019 characters, animated with shadowing (which doubles the character count), plus the FPS counter.  When it renders the text, it renders with kerning information (provided the font has any) so the output should be properly spaced.  And while it’s doing this, it’s scaling the text to pump up the fill rate.

(The video has since been deleted)

All that at ~75 FPS, that’s not too bad hey?

In this particular “demo” you can see that I’m able to compress and expand the lines of text.  This is possible because of the new “LineSpacing” property in the text object.  This allows the user to set line spacing by setting a multiplier.  For example, a LineSpacing of 2.0 will give you double spacing and 0.5 will only move the lines half way.

Anyway, I’m still plowing through all of this.  And I’m pretty happy with the results.

Gorgon v1.x – Visual Studio 2010

I’m updating the solution and projects for Gorgon 1.x in the Subversion respository to use Visual Studio 10 .  The current binary release still uses Visual Studio 2008 and will continue to do so until a new release is put up.

If you are freaking out over this because it’ll somehow be the end of everything you love and hold dear, stop whining and get the express version of VS 2010 here.

Please note Gorgon still uses .NET 3.5 SP1 and you can use the binaries with Visual Studio 2008.  Again, you only need Visual Studio 2010 to compile the source for Gorgon.  I cannot stress that enough.

Text output and Fonts

Sweet merciful fuck.  That was painful.

I just spent the last 4 evenings/nights writing Gorgon’s font system and it was not fun.  And, of course, I’m still nowhere near done (still have to create the TextSprite object, and other the font effects like gradients and GDI+ image brushes).  But, I got it working.  Not only that, unlike the previous incarnation, it actually implements kerning properly (well, approximated kerning, I’m not dicking around with actual kerning.  Fuck that.)    One of the things about the 1.x font/text rendering that I absolutely hated was while it was worked, every now and again (especially on smaller fonts), it’d screw up and a letter would appear slightly (or not so slightly) shifted.  Quite annoying.   Here’s a screen shot showing how awful it was compared to GDI+ and how awesome v2 is going to be (click to expand it):

Gorgon/GDI+ text comparison

Gorgon/GDI+ text comparison

Note that all text is the same font:  Arial, 9.0 point, Bolded and Antialiased.  Also note that v2.0 is nearly (but not quite pixel perfect) identical to the GDI+ DrawString version.  I think that’s a slight improvement.

Continue reading

Gorgon Shaders

So I got custom shaders up and running in Gorgon 2.0.  The new version has always had shader ability because it’s using Direct3D 11, so it’s required to use them.  However, up until now the shader code has been hardcoded to use 3 default shaders.  But after today, there’s an ability to use customized shaders:

In this little sample, there’s a new system at work.  It’s basically a mini effects framework that can do multi-pass rendering and in this video there’s a wave shader and an embossing shader at work on the sprite.  If you want to learn more, click the stupid link below

Continue reading