All Blog Entries

All blog entries, ordered from most recent. Entry count: 1064.

Pages: > 1 2 3 4 5 ... 133 >

# Thoughts after Slavic Game Jam 2017

Jul 2017

Slavic Game Jam 2017 ended today. I have not only given a talk as a representative of the sponsor company, but I was also allowed to participate in the jam itself, so I teamed up with my old friends, some new friends that I met there and we made a game :) The theme this year was "Unknown". Our idea was to create a game about a drone flying and exploring a cave. You can see it here: This Drone of Mine.


There were 2 developers in our team, 3 graphical artists and one sound/music artist. We decided to use Unreal Engine 4, despite we had no previous experience in making games with this engine whatsoever, so we needed to learn everything during the jam. We didn't do any C++ - we implemented all game logic visually using Blueprints. We also set up Perforce for collaboration, so some of us needed to learn that as well (I am fortunate to already know this tool pretty well).

We didn't win or even make it to the second round, but it's OK for me - I'm quite happy with the final result. We more or less managed to implement our original idea, as well as show almost all the graphics, sound effects, music and voice-overs, so the artists' work is not wasted. It was lots of fun and we learned a lot during the process.

You can browse all games created during the jam here: Slavic Game Jam 2017 -

Comments | #unreal #productions #competitions #events Share

# Slavic Game Jam 2017 and my talk

Jul 2017

There are many game jams all around the world. Global Game Jam is probably the biggest and most popular one, but it is a global event that happens at different sites. This weekend Slavic Game Jam takes place - the biggest game jam in Eastern Europe, happening in just one site in Warsaw, Poland.

I will be there not only as a participant, but I will also give a talk, because AMD is a sponsor of the event. My talk will be on Friday at 2 PM. Its title is "Rendering in Your Game - Debugging and Profiling". I will provide some basic information and show some tools useful for analyzing performance of a game, including live demo. This information may be useful no matter if you develop your own engine or use existing one like Unity or Unreal. If you have a ticket for the event (tickets are already sold out), I invite you to come on Friday earlier than for the official start of the jam.

Comments | #teaching #events #competitions #graphics Share

# Vulkan Memory Allocator - a library on GPUOpen & GitHub

Jul 2017

Vulkan is hard. One of the difficulties is the responsibility of a developer to manually manage GPU memory. Various GPU vendors expose various set of memory heaps and types and you need to choose right ones. It is also recommended to allocate larger memory blocks and assign parts of them to individual buffers and images. Now there is a library that simplifies these tasks - a one that I developed as part of my job duties. It has just been announced on GPUOpen blog and published on GitHub:

It is a single-header C++ library with a simple C Vulkan-style interface documented using Doxygen-style comments. It is available on MIT license.

Comments | #graphics #vulkan Share

# Vulkan Bits and Pieces: Synchronization in a Frame

May 2017

One of the things that you must implement when using Vulkan is basic structure of a rendering frame, which consists of filling a command buffer, submitting it to a command queue, acquiring image from swap chain and finally presenting it (order not preserved here). Things happen in parallel, as GPU works asynchronously to the CPU, so you must explicitly synchronize all these things. In this post I’d like to present basic structure of the rendering frame, with all necessary synchronization.

There are actually two objects that we must take care of simultaneously. First is command buffer. One time it is being filled on the CPU by using vkBeginCommandBuffer, vkEndCommandBuffer and everything in between (like starting render passes and posting all the vkCmd* commands). Another time (after being submitted to a queue using vkQueueSubmit) it waits for execution or it is being executed on the GPU. These things cannot happen at the same time, so we need synchronization. Because it’s a GPU-to-CPU synchronization, we use fence for that. It’s better to have multiple command buffers and all these synchronization objects, stored in array and used in a round-robin fashion (with help of index variable) because this way one can be filled while the other one is consumed at the same time.

Second object is an image acquired from the swapchain. One time it is being rendered to during command buffer execution. Another time it is presented on the screen. Again, we need to synchronize it so these states happen in a sequence. Because it’s a GPU-to-GPU synchronization, we use semaphores for that. There are multiple images as well because swapchain consists of several of them (not necessarily used in round-robin fashion, we need to obtain index of a new image using vkAcquireNextImageKHR function, so there is separate imageIndex).

Having following objects already initialized:

VkDevice g_Device;
VkQueue g_GraphicsQueue;
VkSwapchainKHR g_Swapchain;
VkImageView g_SwapchainImageViews[MAX_SWAPCHAIN_IMAGES];

const uint32_t COUNT = 2;
uint32_t g_NextIndex = 0;
VkCommandBuffer g_CmdBuf[COUNT];
VkFence g_CmdBufExecutedFences[COUNT]; // Create with VK_FENCE_CREATE_SIGNALED_BIT.
VkSemaphore g_ImageAvailableSemaphores[COUNT];
VkSemaphore g_RenderFinishedSemaphores[COUNT];

Structure of a frame may look like this:

uint32_t index = (g_NextIndex++) % COUNT;
VkCommandBuffer cmdBuf = g_CmdBuf[index];

vkWaitForFences(g_Device, 1, &g_CmdBufExecutedFences[index], VK_TRUE, UINT64_MAX);

VkCommandBufferBeginInfo cmdBufBeginInfo = { VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO };
vkBeginCommandBuffer(cmdBuf, &cmdBufBeginInfo);

// Post some rendering commands to cmdBuf.

uint32_t imageIndex;
vkAcquireNextImageKHR(g_Device, g_Swapchain, UINT64_MAX, g_ImageAvailableSemaphores[index], VK_NULL_HANDLE, &imageIndex);

// Post those rendering commands that render to final backbuffer:
// g_SwapchainImageViews[imageIndex]


vkResetFences(g_Device, 1, &g_CmdBufExecutedFences[index]);

VkSubmitInfo submitInfo = { VK_STRUCTURE_TYPE_SUBMIT_INFO };
submitInfo.waitSemaphoreCount = 1;
submitInfo.pWaitSemaphores = &g_ImageAvailableSemaphores[index];
submitInfo.pWaitDstStageMask = &submitWaitStage;
submitInfo.commandBufferCount = 1;
submitInfo.pCommandBuffers = &cmdBuf;
submitInfo.signalSemaphoreCount = 1;
submitInfo.pSignalSemaphores = &g_RenderFinishedSemaphores[index];
vkQueueSubmit(g_GraphicsQueue, 1, &submitInfo, g_CmdBufExecutedFences[index]);

presentInfo.waitSemaphoreCount = 1;
presentInfo.pWaitSemaphores = &g_RenderFinishedSemaphores[index];
presentInfo.swapChainCount = 1;
presentInfo.pSwapchains = &g_Swapchain;
presentInfo.pImageIndices = &imageIndex;
vkQueuePresentKHR(g_GraphicsQueue, &presentInfo);

At least that’s what I currently believe is the correct and efficient way. If you think I’m wrong, please leave a comment or write me an e-mail.

That’s just one aspect of using Vulkan. There are still more things to do before you can even render your first triangle, like transitioning swapchain image layout between VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL and VK_IMAGE_LAYOUT_PRESENT_SRC_KHR.

Comments | #vulkan #graphics Share

# Artykuł: Praca zdalna - 10 faktów i mitów

May 2017

(Polish) Dziś Święto Pracy. Z tej okazji publikuję artykuł, który ostatnio napisałem, tym razem w języku polskim. Opisałem w nim, na podstawie mojego doświadczenia, zalety i wady pracy zdalnej. Rozmawiając ze znajomymi słyszę nieraz różne opinie na temat pracy z domu, spośród których nie wszystkie są prawdziwe. To zachęciło mnie do napisania tego artykułu:

» Praca zdalna – 10 faktów i mitów

(English) This time I publish an article I've written in Polish. Its title can be translated as "Remote Work - 10 Facts and Myths".

Comments | #productions #life Share

# I Implemented Video and GIF Playback with FFmpeg

Apr 2017

I started my music visualization project with a possibility to load a collection of static images, accompanied with metadata that describe their parameters like dominant colors, whether it uses alpha transparency or whether it is tileable (description of these parameters could be a topic of another blog post). I then render them as textures, moving, rotating and changing colors randomly, blended together, with a possibility of feedback from previous frame. This mathod may sometimes generate quite interesting images, but it has its own limitations and becomes boring after some time.

Generating some interesting graphics procedurally from scratch is my ultimate goal. But while writing shaders is fun and can give amazing results (as we can see on ShaderToy), it's also the hard way. So to be able to show something interesting, for now I've implemented playback of videos and animated GIFs, using FFmpeg library.

FFmpeg is a free tool that contains its own codecs for various video and audio formats (so it doesn't use the codecs installed in Windows). It is known as a command-line program that can convert about any video format, but it's also a software library that offers this encoding/decoding features to developers. I learned to use this library because I needed to implement video playback for one of my shows.

Later I discovered that it can play animated GIFs as well. This is a great feature, because having hundreds of such GIFs downloaded and being able to switch between them in an instant can make quite interesting visuals. There are many abstract, geometric, psychedelic animations shared all around the Internet, like on Op Art or Fractalgasm Facebook pages. At the same time, possibility to play all popular video formats is much more comfortable than what Resolume offers, which requires converting all the footage to its own codec, called DXDI (by the way, FFmpeg is able to play this as well).

I won't show any source code this time, but if you are a developer and consider implementing support for video playback or encoding, I recommend FFmpeg library. Other option is libVLC - a library behind popular VLC media player, which also has its own set of codecs. I also used it some time ago. Playing anmimated GIF-s is also possible through Windows Imaging Component (WIC), which is part of standard Windows API.

Comments | #graphics #video #vj Share

# New Job at AMD

Apr 2017

It's already 3 months after I started a new job, so I think I can write something about it. Before that I've spent last 5 years living in Gdańsk and working at Intel. I've been developing shader compiler, which is part of the driver for Intel integrated GPU-s.

Now I moved back to Warsaw and I work at AMD. My position is called Developer Technology Engineer. (Other name is SMTS Software Developer Engineer - Senior Member of Technical Staff. You can find my colleagues on LinkedIn specifying one or the other.) This job is quite different. I'm responsible for cooperation with game development studios to make sure their PC games work well on AMD graphics cards. On the other hand, it's similar in the way that I still work with native C++ code, graphics APIs (like DirectX, Vulkan), shaders, and low-level GPU stuff,  yet it's not a work strictly in the game industry - so a very unique position.

Comments | #career Share

# Revision 2017

Apr 2017

I just came back from Revision - world's biggest pure demoscene party. It was held in Saarbrücken, Germany. That was first time I attended a demoparty abroad, as I've been going only to the ones in Poland so far, like RiverWash, WeCan, Silly Venture, or AmiWaWa.

I don't like the fact that it happens during Easter, when I usually go visit my parents, but I wanted to see it at least once. Revision was big, with around 700 participants, according to the page with non-mandatory registration - Visitors. There were various kinds of activities - from Seminars to techno party, and of course most importantly - competitions. Revision is a multiplatform demoparty, so there were compo categories dedicated to retro platforms (like Amiga, pixel art or tracker music), as well as modern PCs (like modern graphics, streaming music, PC 4K/8K/64K intro and demo). Entries can be found here: Revision 2017 @

Many people said that PC 4K Intro category had best quality this year, so it's worth checking. Other than that, productions that I remembered the most are:

"Soul Splitter" by cocoon, 1st place, PC demo

"PC demo" by Aberration Creations, 2nd place, Animation

"Evolve" by Schengen Allstars, Invitation demo

Most exciting for me was watching Shader Showdown - a competition where two programmers had to write a pixel shader live on stage, without any documentation or other help, in a time frame of 25 minutes per round. Winner moved on to semifinals and then the final. During each round a DJ was playing some music and its live FFT was available as one of the inputs to the shader. It's amazing to see how good knowledge of programming, graphics and math allows to develop some nice looking visualizations in such a short period of time. I've also heard opinions that watching it gave a good glimpse of how graphics programming looks like and what does it take to make a demo, even for non-technical people.

Here is a gallery of my photos from the event:

Comments | #demoscene #events #gallery Share

Pages: > 1 2 3 4 5 ... 133 >

[Stat] [STAT NO AD] [Download] [Dropbox] [pub] [Mirror]
Copyright © 2004-2017