Vulkan’s coordinate system

One of the key differences between OpenGL and Vulkan -and something that needs careful consideration when porting to Vulkan- is the coordinate system. Khronos’ Vulkan working group decided not to use GL’s commonly used coordinate conventions in favor of something more widely used and accurate and that’s the main reason behind this shift.

Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Clustered volumetric fog

I’ve written an article on how volumetric fog works in AnKi. You can read it at ARM’s developer portal. This is still in progress but for now the performance is acceptable.

Posted in Uncategorized | Tagged , | Leave a comment

Porting AnKi to Vulkan part 2

In my Porting AnKi to Vulkan post I went into detail describing how AnKi’s interfaces changed to accommodate the Vulkan backend and how this backend looked like. Eight months have passed since then and a few things changed mainly towards greater flexibility. This post describes what are the differences with the older interfaces, how is the performance currently and what new extensions AnKi is using now.

Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

Volumetric lights/fog test

Short video of a test for volumetric lights. It is using the same information as the cluster deferred shading path. The shader iterates every cluster and samples at a random position inside the cluster. The result is too noisy at the moment, especially with shadows.

Posted in Uncategorized | Tagged | Leave a comment

One decade working on AnKi. Uploaded the first snapshot I found in my archive

It’s almost 10 years of AnKi so I decided to to upload a very old snapshot of the engine I have lying in my hard drive. This early snapshot is a few years before I used any revision control. Browse the code here https://github.com/godlikepanos/anki-3d-engine-2007

Some interesting facts:

  • It started as a simple skeletal animation project and grow to what it is now.
  • Was featuring a blender 2.4 exporter for meshes, skeletons and skeletal animations.
  • It was running on OpenGL 1.1 with immediate mode.
  • The code is a weird mixture of (Microsoft-centric) C++ and C.
  • It was compiling only in ancient versions of VisualC++. Had to struggle to get it compile with GCC.
  • Different code style from what AnKi has now.
  • The first name of AnKi was Malice. Kept that name for a few months.
Posted in Uncategorized | Leave a comment

Deferred decals video demonstration

Short video of deferred decals in AnKi. For now it supports diffuse and roughness.

Posted in Uncategorized | Leave a comment

The journey of porting AnKi to Vulkan

Someone once said “make it work, make it fast, make it pretty” and I’m happy (and at the same time relieved) to say that the effort of porting AnKi to Vulkan just hit the first major milestone! It’s working! I think this is a good time to share a few thoughts on how this milestone was achieved, the pains and generally the overall experience. Disclaimer: Whatever you read in the following lines reflects my own views and not those of my current employer.

So let’s start from the beginning. Continue reading

Posted in Uncategorized | Tagged , | 4 Comments

Solving the Linux multi-monitor problem with SDL 2.0

A few days back I decided to upgrade my Ubuntu 14.04 LTS to Ubuntu 16.04 LTS and the first thing I did, after the upgrade, was to re-build and test AnKi. Everything seemed to work fine except the fullscreen mode. In my dual-monitor setup and with 14.04 SDL was creating a fullscreen SDL_Window in my primary monitor and the second monitor was left alone. In 16.04 though the fulscreen window covered both the monitors and it was placed in a very odd position. This is the code I’m using to create the SDL_Window:

U32 flags = SDL_WINDOW_OPENGL;

if(init.m_fullscreenDesktopRez)
{
	flags |= SDL_WINDOW_FULLSCREEN_DESKTOP;
}

m_impl->m_window = SDL_CreateWindow(&init.m_title[0],
	SDL_WINDOWPOS_UNDEFINED,
	SDL_WINDOWPOS_UNDEFINED,
	init.m_width,
	init.m_height,
	flags);

I spend quite a few hours trying to understand the issue and after some digging I found out that SDL was reporting only one display (SDL_GetNumVideoDisplays) with the resolution of my entire desktop. Obviously that was wrong. After trying different stuff I found out the culprit. Apparently SDL 2.0 is using libxinerama.so to query some information related to multi-monitor setups. Since my Ubuntu installation was brand new I didn’t have that library installed. That didn’t stop SDL from building but querying multiple monitors was not working properly.

Hopefully this sort post will help people that have similar problems. If you have multiple monitors and you are using SDL 2.0 install libxinerama-dev.

Posted in Uncategorized | Tagged , | Leave a comment