How to shrink down a git(hub) repository

Starting point

With my Vulkan C++ example github repository approaching 200 MB in size I decided it was about time to shrink it down to a reasonable size again. Shrinking a git(hub) repository isn’t just about deleting locally present files but requires cleaning up the history as files that have been removed are still present in the repository’s history and therefore still contribute to it’s size.

A big chunk of the repo’s size is caused by binary assets like textures and 3d models. When I started out with my Vulkan example there were only a few assets so I just added them to the repository. In hindsight this was the wrong decision, so one of my primary goals was to remove all those assets from the repository and it’s history. I already stopped adding assets while I did some examples using HDR textures and moved them into a separate asset pack that needs to be downloaded to actually run these examples. After removing the assets I’ll no longer add any of them to the repo but rather put them into the separate asset pack.

So in this article I’ll try to describe how to shrink down a long running repository without having to recreate it. For my Vulkan examples this resulted in a much smaller repository that’s a lot faster to clone.
Continue reading

The Vulkan Device Simulation Layer

LunarG recently made the new Vulkan Device Simulation layer public. This is a Vulkan instance level layer that injects physical device properties, limits and features based on a json input file, simulating different features than the actual Vulkan device you are running on. The idea behind this is to help developers check if their Vulkan applications can handle devices with missing features and tighter limits without having to actually run on a such a device. It’s not an emulation (like a software rasterizer, e.g. WARP for DirectX) and only affects queries against the device limits and features, so you can’t magically get e.g. tessellation support on a device that doesn’t support it by using this layer.

But still this is a nice addition to the Vulkan eco system and is especially handy for smaller devs that don’t own all the different devices they intend to run their applications on. With this layer you check your fallback paths and how your application handles missing device features.
Continue reading

Updated Vulkan deferred shading example video

Over the past few weeks and months I’ve been constantly working on my Vulkan examples, enhancing existing demos, adding new ones, fixing bugs reported and merging pull requests (thx to anyone that has contributed!). I even found some time to work on a Vulkn deferred shading playground using Crytek’s famous Sponza model. You can find the repository for it here.

This Sunday I decided to visually upgrade the deferred shading example included in my samples repository. Deferred shading is commonly used nowadays, and I felt that the example didn’t showcase the technique properly. And so I went on to add some normal mapped surfaces, render multiple meshes and make the light sources dynamic.

And thanks to nvidia’s ShadowPlay I can even capture the Vulkan samples at nice frame rates, so I decided to upload a small video of the updated example to my YouTube channel:

Continue reading

Vulkan is here!


Khronos finally launched Vulkan 1.0!

After 18 months of hard works and a huge industry-wide collaboration, this is a huge success. And this is not only an API-launch, but a hard launch with drivers for Vulkan from NVidia, AMD, Intel, etc. on mulitple platforms.

My launch contributions

Some time ago I was invited to be a part of the Vulkan Advisory Panel board. So I actually got a head-start and also released some Vulkan related stuff to the public on launch day. I even made it onto the Vulkan Launch page and was quoted in a press release by NVIDIA 🙂

Vulkan examples

You can find a bunch of Vulkan examples (C++) over at my github repository. They contain over two dozen examples, and even a few for getting started on Android (if you own Android hardware that supports Vulkan). Feel free to fork and contribute!

Vulkan hardware database

My OpenGL and OpenGL ES hardware database are frequently used (and quoted) by many developers, so I went on and also created a Vulkan Hardware Capability Database (and viewer). Vulkan is a bit more explicit than OpenGL and offers much more information, so once the database is filled with enough hardware reports this should become a valuable resource for developers.


Being part of this was a great experience, and I’d like to thank everybody on the Vulkan Working Group and Advisory panel, and the fine people over at LunarG and the IHVs I’ve worked with!


gpuinfoAside from playing around with a certain new API, I’ve also been working on the web front end OpenGL and OpenGL ES hardware database.

Though I redid the visual side of both some time ago they differed too much for my taste and especially the OpenGL ES database was lacking lots compared to the OpenGL one. No live search, bad visuals (especially for the reports), lacking compare features and much more.

So I did put lots of work in getting both database up to the same standards, optimize the visual presentation and also created a landing page at, that is home to the current hardware databases (OpenGL, OpenGL ES), with at least one new database (Vulkan) coming in the near future.

The OpenGL database is now available at New features include a list of maximum supported OpenGL version by device and listing of compressed texture formats for comparing multiple reports.

The OpenGL ES database is located at Aside from the complete visual overhaul, it now offers (mostly) the same functionality as the OpenGL database. All tables now support a live search (thanks to datatables), report information is now presented in tabs and the launch page has been replaced by a report listing like the one on the OpenGL database.

Source for all the pages (including are available at my github repository, so if you find any bugs feel free to report them there.

Parallax offset mapping with WebGL


Years ago I wrote a demo showcasing different normal mapping techniques with Delphi, but never got around cleaning up the source and releasing it. While working on my WebGL dungeon crawler prototype I dug out the old code, cleaned it up and ported it over to WebGL, so you don’t need a compiler to see it in action and play around with it.

Parallax mapping uses an additional heightmap (together with a normal map) to add more depth to flat surfaces depending on the current camera angle. It’s currently lacking shadowing, but that’s something I might add in the future.

01 03

(Left : Normal mapping , right : Parallax offset mapping)

You can get the sources from my GitHub repository :

Continue reading

Geometry instancing with WebGL 2

webgl-logoWebGL, based on OpenGL ES, brings hardware accelerated OpenGL to your browser, and version 2.0 is around the corner (specs). I’ve been playing around with WebGL (via JavaScript) for some time now (see my GitHub WebGL repo) and recently Google’s chrome (canary) got WebGL 2 support.

WebGL 2.0 adds some interesting new features, with geometry instancing being one of them, so I sat down and wrote a small demo that shows how to render the same instance of a single mesh with differing shader attributes using instancing and only one drawcall :

Continue reading

2014 – Final posting

9903c7c14add3fd0758b7b5b80c24d48101f296f13ce34736799a82c71f61bc2As another year ends, it’s time for a small retrospect. Next year marks the 10th anniversary of my personal blog, so I’ve been posting about my programming adventures for over a decade now (the first version of went online 2003 afair) and I’m still having lots of fun hacking code into different IDEs with different languages, though focus is shifting from time to time. And that’s actually what makes coding so much fun, it’s a constant learning progress that forces you to constantly sharpen your coding skills, learn new languages, adopt to new technologies etc.

So yes, it’s very time consuming, but it’s also very rewarding and surely has positive effects on your brain and all other mind-related skills. And I don’t think that I’ll ever stop coding, ’cause that would surely leave a whole in my life that would be hard to fill, especially since it’s so creative.

So here we are at the end of 2014, and lot’s of things happened during that year, so I’ll post a quick summary of the programming related things that moved me during 2014.


I’m on twitter now (like anybody else on this tiny planet I guess). The main reason I’m not posting as much on my personal blog as I used to to is twitter. I initially decided to use it because people were talking about my OpenGL and OpenGL ES hardware databases and tools, and wanted to reply to them.

But in the end it turned out to be much more and I’m using twitter now  on a daily basis now. It’s the perfect way of finding like-minded programmers, and you often get instant feedback and end up with interesting discussions. And you also realize that all those coders at google, nvidia, amd, valve, etc. are just regular people like yourself 😉

JavaScript and WebGL

2014-11-16 19_35_20-Unscheinbar (WIP) - Copyright © 2014 by Sascha Willems ( also did lots of experimenting with JavaScript and WebGL. Though I must admit that it’s a complete different world compared to the strongly typed languages I normally use. I kinda like JavaScript (although it seems most “real programmers” wouldn’t agree with me on that), and compared with WebGL it’s great to see how easy it is to use OpenGL on almost every device out there by simply opening up a browser.

Though WebGL is still in it’s early stages, it’s already shaping up very well, and khronos is putting in a lot of effort to make WebGL the open 3D standard for the web. And I wish them the best luck.

And if you followed my tweets, you may have seen that I’m developing a new game with JavaScript and WebGL. It’s called “unscheinbar” and will be using the random dungeon generator I posted to JS some time ago. It’ll be more of an experiment than a game, with visuals and elements found on trugbild. There’s not much to see yet, as it’s still in it’s very early stages, but I hope to have it up and running some time within the first half of 2015.

And since JS and WebGL are so great for rapid prototyping, I also have a few more game ideas written down somewhere for which I’d like to create some prototypes in 2015.

C++ rocks (again)

A few weeks ago Microsoft dropped the bomb that made m2014-12-21 13_07_00-glcapsviewer 1.0 - © 2011-2015 by Sascha Willems ( completely move away from Delphi/Free Pascal for my private programming stuff : They released the Visual Studio 2013 community edition.

So with a full (free) Visual Studio available to everyone, I completely stopped using and Pascal related languages for my private coding (Delphi and Free Pascal with Lazarus). The IDE is just awesome, and if you compare it to the fat, slow and buggy Delphi-IDE it just shows that MS is driving circles around Embarcadero.

So for my first (real) C++ projects in over a decade I decided to port the OpenGL hardware capability viewer (glCapsViewer) over to C++, using Qt for the Gui. And it’s awesome. I’m having so much fun writing C++ code in Visual Studio that I can hardly stop (screw the dishes 😉 ).

It’s coming along very nice, and won’t become a simple but port. It’ll be getting some new features and I also plan on releasing the sources to it, so other people can contribute to it.


Going open source

For a long time, I had severe reservations on releasing my sources to the public, and with the exception of a few simple projects and headers, most of my source was closed and not available to the public. But with the switch over to new programming languages and platforms, I decided it would be a great way to put my new sources into the public, and that’s why I decided to open up a repository over at bitbucket.

And that’s what I’ll pursue even more for 2015 : Making more of my sources available to the public. Sure, there may be drawbacks like people “stealing” your code and not giving a single f**k on your license, but the advantages easily outweigh these, so I’m still sure that this is a good idea.

Closing words

And so ends another great year, with lots of great stuff happening on the programming front. If 2015 will be anything like 2014, I’d be totally happy 🙂

So I wish you all happy holidays a happy and healthy 2015!